shell: linux variables $#,$@,$0,$1,$2,$*,$$,$?

Shell

1
2
3
4
5
6
7
8
9
#!/bin/sh
echo "number:$#>"
echo "scname:$0>"
echo "first :$1>"
echo "second:$2>"
echo "argume:$@>"
echo "show parm list:$*>"
echo "show process id:$$>"
echo "show precomm stat: $?>"

原文:http://www.0550go.com/script/shell/linux-variables-012.html

Leave a Reply