hi
Can any one explain me difference between @# and @* with the help of examples?
Thanks
hi
Can any one explain me difference between @# and @* with the help of examples?
Thanks
not sure what it means, by any chance do you mean a $@ and a $* ??
$*, $@ -all positional parameters, but...
Here are examples:
1:
#!/bin/sh
./2 $*
./2 $@
./2 "$*"
./2 "$@"
2:
#!/bin/sh
echo "'$1'" "'$2'"
Test it
$ ./1 'a b' 'c d'
'a' 'b'
'a' 'b'
'a b c d' ''
'a b' 'c d'
The $* variable treats spaces within variables, and spaces between variables the same. The variable $@ retains the spaces
If you meant perl see perlvar(1) (there are a lot of variables)