标签:done lin span class https bsp echo -bash linux
参见ibm网站示例:
https://www.ibm.com/developerworks/cn/linux/l-bash-parameters.html
示例:
[ian@pinguino ~]$ type testfunc2 testfunc2 is a function testfunc2 () { echo "$# parameters"; echo Using ‘$*‘; for p in $*; do echo "[$p]"; done; echo Using ‘"$*"‘; for p in "$*"; do echo "[$p]"; done; echo Using ‘$@‘; for p in $@; do echo "[$p]"; done; echo Using ‘"$@"‘; for p in "$@"; do echo "[$p]"; done }
执行如下:
[ian@pinguino ~]$ IFS="|${IFS}" testfunc2 abc "a bc" "1 2 > 3" 3 parameters Using $* [abc] [a] [bc] [1] [2] [3] Using "$*" [abc|a bc|1 2 3] Using $@ [abc] [a] [bc] [1] [2] [3] Using "$@" [abc] [a bc] [1 2 3]
标签:done lin span class https bsp echo -bash linux
原文地址:https://www.cnblogs.com/wenxiao1-2-3-4/p/9910419.html