gogoge
10/27/2015 - 5:07 AM

shell script and its argument

>$ ./a.sh arg1 arg2 arg3 arg4

$*:arg1 arg2 arg3 arg4
$@:arg1 arg2 arg3 arg4
$0:./a.sh
$1:arg1
$#:4

$* = $@ = all argument (not including command itself)
$0 = command file
$n = nth argument
$# = count of argument