The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-29-2008
fabtagon fabtagon is offline
Registered User
  
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 189
Quote:
Originally Posted by littlejon View Post
$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


Last edited by fabtagon; 05-29-2008 at 09:08 PM.. Reason: 2nd question & markup fix