Skip to main content
5 events
when toggle format what by license comment
May 10, 2011 at 10:44 comment added Asmus @Gordon In this case, with the "Allow Multiple Selection" checkbox unchecked, there will actually never be more than one argument passed to the shell script. Putting $@ in double quotes is indeed necessary (as I did in my original answer).
May 7, 2011 at 15:42 comment added Gordon Davisson Actually, I'd recommend using cd "$1" instead. $@ expands to the list of all arguments passed to the script, and if there's more than one cd will just gripe that it can't go more than one place; $1 expands to the first argument, so if you manage to pass it more than one it'll just go with the first. Also, make sure you use double-quotes around it, to keep the shell from getting confused by funny characters (like spaces) in the folder path.
Mar 1, 2011 at 21:28 vote accept Corey Riggle
Mar 1, 2011 at 21:27 comment added Corey Riggle I've seen the "$@" command but wasn't sure how to use it. I simply put "cd $@" at the beginning of my script and it solved the problem. Thanks for your help.
Mar 1, 2011 at 21:22 history answered Asmus CC BY-SA 2.5