Hi All,
I have to debug a unix script file prepared originally by another person.
The script file uses the $@ variable which i guess is a standard Unix variable.
The command is something like this:
Java_PATH=<JAVA_PATH>
<JAVA_PATH>/bin/java com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.webservices.tools.WSDL2Java "$@"
i need to know what does $@ signify?
for bash:
"$@" mean all arguments to current script
That is, "$@" is equivalent to "$1" "$2" ...
#!/bin/bash
echo "All args: $@"
echo "First arg: $1"
echo "Second arg: $2"
-----
$ script.sh 1 2 3 4
All args: 1 2 3 4
First arg: 1
Second arg: 2
man bash
/^\ +\@
Hi Drugplant,
Thanks for replying.
That explains the script.
But note that $@ is the same as $*; it must be quoted for it to be different.