Ted's Blog

Happy coding


用tar一次解压多个*.tar文件

$@与$*的区别

Ted posted @ 2008-08-04 02:18PM in 未分类 with tags shell
删除空行

$cat test.sh
  for   i   in   "$@";   do   echo   $i;done 
  for   i   in   "$*";   do   echo   $i;done  

$./test.sh   “abc   efg”   hij 

输出:

abc efg
hij
abc efg hij
 

可看出$*是对整个参数表的引用

 

Comments Feed


* Login
*