lostperls has asked for the wisdom of the Perl Monks concerning the following question:
I have this command if (!system("adduser $username -g 100 -s /bin/false -d /home/$username -p $encrypted_pass -e $expiry_date -c $realname")) { But because $realname can contain spaces it needs to be passed to adduser as -c "my real name is bob", rather than -c my real name is bob.
I cant put " " round the $realname as this doesn't work. Any ideas how to rewrite this?
Cheers
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Running System Commans With ""
by fruiture (Curate) on Sep 11, 2002 at 19:37 UTC | |
by John M. Dlugosz (Monsignor) on Sep 11, 2002 at 21:02 UTC | |
by fruiture (Curate) on Sep 12, 2002 at 14:13 UTC | |
by John M. Dlugosz (Monsignor) on Sep 12, 2002 at 15:03 UTC | |
|
Re: Running System Commans With ""
by jkahn (Friar) on Sep 11, 2002 at 19:42 UTC | |
by samurai (Monk) on Sep 11, 2002 at 20:20 UTC | |
by jkahn (Friar) on Sep 11, 2002 at 20:26 UTC | |
by merlyn (Sage) on Sep 12, 2002 at 17:04 UTC |