help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] eval backgrounds with & in variable string


From: Jesse Molina
Subject: [Help-bash] eval backgrounds with & in variable string
Date: Fri, 14 Mar 2014 12:29:28 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24


Behold my glory:

[~/work/eval_testing]
address@hidden>eval echo 'one&uno&ichi'
[3] 14201
[4] 14202
one
-bash: uno: command not found
-bash: ichi: command not found
[3]   Done                    echo one
[4]   Exit 127                uno




Okay, that's definitely not what I wanted. Eval seems to have evaluated my "&" characters into being a split and then tries to background those commands.

Can I "set" something to make this work, or am I going to have to escape these on input?



While on the subject of eval, does anyone else have fun examples, known pitfalls, and other interesting things?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]