Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '"option" not found' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
"option" not found
Authored by: dlgraves on Mar 17, '03 12:05:08PM

hi

I have a similar problem: the 'itunes' script runs but breaks when it gets to this line:

echo \"Usage: `basename $0` <option>\";

At that point the script says:

/Users/dlg/bin/itunes: option: No such file or directory

Does anyone understand what's going on? If this is an error within the script I don't see how it could work for other people.
Thanks a lot.

Lucas



[ Reply to This | # ]
"option" not found
Authored by: logo on Mar 18, '03 04:16:47AM

>> echo \"Usage: `basename $0` <option>\";

Remove the backslashes!

Currently you echoing " and then issuing the command with read input (<) from option...
and not an echo of the string containing "...<option>"

HTH



[ Reply to This | # ]
"option" not found
Authored by: mervTormel on Mar 18, '03 12:37:44PM

it's a little more complicated than that.

basename can take an argument, and if $0 is -bash (interactive bash shell), then basename gaks on the -switch.

so, pass basename the -- switch so that it stops processing arguments...

echo "Usage: `basename -- $0` <option>";

this works on the command line; you may need to quote it up some for your shell/script



[ Reply to This | # ]