From: "banzai" <banzai@aaa.com>
Subject: Re: Script problem
Date: Sat, 14 May 2005 08:56:23 GMT [thread overview]
Message-ID: <X2jhe.5428$3n.4994@news.cpqcorp.net> (raw)
In-Reply-To: d62jq7$96j$2@domitilla.aioe.org
Haven't tested, but from the top of my head you coud add a second parameter
to read
i.e.
read name1 name2
and then
/usr/sbin/dop useradd_script -g 201 -d $home1 -c $name1 $name2 $user1
"Glonn" <glenn.morris@hinchingbrooke.nhs-dot-uk.no-spam.invalid> wrote in
message news:d62jq7$96j$2@domitilla.aioe.org...
> I am trying to create a user account adding script using 'useradd'
> the problem is I cannot seem to enter the persons name with a space in
> the text field i.e. -c 'Jack Burton' see script below
>
> echo "Enter Username"
> read user1
> echo "Type Home Directory"
> echo "i.e. /home/IOP"
> read home1
> echo "Type First Name Surname"
> read name1
>
> /usr/sbin/dop useradd_script -g 201 -d $home1 -c $name1 $user1
>
> exit
>
> The script above replies with a syntax error because $name1 has a
> space in it how do I enter it with the ' ' enclosing the string
>
> Thanks in advance
>
> Glonn
>
next prev parent reply other threads:[~2005-05-14 8:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-13 16:15 Script problem Glonn
2005-05-14 8:56 ` banzai [this message]
2005-05-14 13:22 ` vishal
2005-05-14 18:21 ` Stuart Fuller
2005-05-18 9:50 ` problem Glonn
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox