Software
>>
OS
>>
Unix
>>
Solaris
>>
Shell
>>
How to execute a command stored in a string from within a script
Example :
user=foo
cmd="useradd -m -d /export/home/$user -g staff $user"
eval $cmd
Please enable JavaScript to view the
comments powered by Disqus.