![]() |
saturday night shell scripting question - Printable Version +- MacResource (https://forums.macresource.com) +-- Forum: My Category (https://forums.macresource.com/forumdisplay.php?fid=1) +--- Forum: Tips and Deals (https://forums.macresource.com/forumdisplay.php?fid=3) +--- Thread: saturday night shell scripting question (/showthread.php?tid=100052) |
saturday night shell scripting question - mattkime - 07-11-2010 i'm writing a script which attempts to assemble an argument for another script. however, its not seeing the argument as a single string but as multiple strings and therefore multiple arguments. filePath=\"`pwd`/${files[$index]}\" /test.sh $filePath if i copy the output of that line and execute it from the command line it works perfectly fine because its read as a single argument. Re: saturday night shell scripting question - gabester - 07-11-2010 hmmm... I'm not sure I have enough to work with here. If your script is passing multiple strings instead of single strings as desired can you join them? Or is it a variable number of strings that are getting returned? Maybe the strings returned can give you a clue about what your script is doing and how it's misbehaving? g= Re: saturday night shell scripting question - microchip - 07-11-2010 I've run into this issue before.... I believe, stick double quotes around the backticks...otherwise I'll get you my real solution tomorrow morning! Re: saturday night shell scripting question - mattkime - 07-11-2010 i guess i'm waiting for your real solution, microchip. i've tried a variety of quote combos without luck... Re: saturday night shell scripting question - testcase - 07-11-2010 Frammicate the gizzinta and adjust the widget as needed. |