Argument passing in .sh scripts Argument passing in .sh scripts shell shell

Argument passing in .sh scripts


Works fune for me.

I don't know what the -N command means, but

#!/bin/bash -l#$ -S /bin/bash#$ -N $2echo $1echo $2

when called by sh foo.sh a b promptly echoes

ab


No you can't. The # at the beginning of the line makes it so that the $2 won't be replaced by the argument to the script. The way to do what you're trying to do is

qsub foo.sh -N <name>