On Thu, Aug 28, 2008 at 8:25 PM, juliodm <[EMAIL PROTECTED]> wrote: > > I'm writing a bash script to that will execute commands from a database. > What I mean is that the MySQL database contains commands that bash will pull > and then run itself. > > My problem is that some of the commands contain single quotes, as needed by > the shell app it plans to run. > When I write a line like the one below directly in the bash script: > `myapp -f dosomething -s 'do_some_other_thing -p some_more_things' -l > end_of_my_line` > > It works fine.... but when I assign it to a variable like: > COMMAND="myapp -f dosomething -s 'do_some_other_thing -p some_more_things' > -l end_of_my_line" > $COMMAND
See: http://wooledge.org:8000/BashFAQ#head-df4f1d6edc5630c40f6876dcff9e21407d49308c