Quote:
Originally Posted by littlejon
$mycmd=$mycmd ' sed -i prev s/aaa/bbb/'
|
mycmd=$mycmd '
sed -i prev s/aaa/bbb/'
(no $ at the beginning of the line)
Quote:
|
execute the command from the variable
|
Code:
fab@adeon:~$ a="echo hi"
fab@adeon:~$ $a
hi
fab@adeon:~$ eval $a
hi