[Bash] execute string as command
Hi,
I am trying to execute a string as command. Code:
txt="echo \"abc\"" Code:
./test.sh: line 2: "abc": command not found Thanks. Michael |
I don't totally understand what you are trying to do, but if you need to send a command into a string there are couple of tricks:
Code:
$(command) Code:
foo=`code` Regards, Alunduil P.S. If this isn't correct, just post back with more specifics, and I'll try again. |
Quote:
|
All times are GMT -5. The time now is 04:51 PM. |