The parameters are $1, $2, etc.
So, in your example, whatever %1 is will be $1 in test.sh
But, how are you running DOS .bat files and *nix .sh files in the same environment? That doesn't make sense.
You might also want to look at $# (the number of arguments) and $@ and $* which are all the arguments. i.e. If the call is
Code:
myscript one two three
and the script is
Code:
echo $1
echo $2
echo $3
echo $#
echo $*
Then the output should be
Code:
one
two
three
3
one two three
Notice that in shell scripts variables are denoted by the $ sign. So, what in a batch script would be %COUNT%, in a shell script it is $COUNT. If you need to delimit it try ${COUNT}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.