I have a variable COMMAND that contains
COMMAND="grep \"TEXT\" myfile"
when i echo $COMMAND I get
grep "DOG CAT" myfile
when i execute
$COMMAND
it does not work properly
Does anyone know why this is not working
I have a variable COMMAND that contains
COMMAND="grep \"TEXT\" myfile"
when i echo $COMMAND I get
grep "DOG CAT" myfile
when i execute
$COMMAND
it does not work properly
Does anyone know why this is not working
Try
eval $COMMAND
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]