Pass parameters through bash doesn't work
Hi all,
First of all, apologises for main topic, but I'm not able to change its name. I'm writting a script in bash with some functions and it doesn't work properly. For example, which is what happens: Code:
compFunct(){ Errormessg: Code:
tar -czvf: command not found Thanks, Eudald |
What is your input command?
Have you tried putting #!/bin/bash -x at the top and running again for additional error output? Try that. |
Hi szboardstretcher,
There's no input on this script, Thanks for your tip, I've noticed that the function takes the parameter as a whole cause I changed IFS at the beggining of the script for other needs. I'll change that and will check if it works. Edit: It works, thanks once again Eudald |
That's why you should always paste your whole script when troubleshooting ;) Glad you got it worked out.
|
I would be curious to know how it worked? If you reset IFS back to its original value your 4 positional arguments will move and be incorrect as vFormat unquoted will now yield:
Code:
$1 - tar |
All times are GMT -5. The time now is 11:50 PM. |