Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
saturday night shell scripting question
#1
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.
Reply
#2
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=
Reply
#3
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!
Reply
#4
i guess i'm waiting for your real solution, microchip.

i've tried a variety of quote combos without luck...
Reply
#5
Frammicate the gizzinta and adjust the widget as needed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)