linux中$* $@ 以及各自…
来源:互联网 发布:阿里云备案网站名称 编辑:程序博客网 时间:2024/05/20 02:55
为了方便,这里记录一下实验结果,方便以后查询 echo $i echo $i echo $i echo $i
实验程序如下:
#!/bin/bash
echo '$@'
for i in $@
do
done
echo '"$@"'
for i in "$@"
do
done
echo '$*'
for i in $*
do
done
echo '"$*"'
for i in "$*"
do
done
然后测试,输入参数是"ab cd" ef时,$* $@以及各自加上引号分别是怎样的结果
sh echovar.sh "ab cd" ef
$@
ab
cd
ef
"$@"
ab cd
ef
$*
ab
cd
ef
"$*"
ab cd ef
阅读全文
0 0
- linux中$* $@ 以及各自…
- Unix/Linux 脚本中 "set -e" 的作…
- [转]inotify -- Linux 2.6 内核中…
- Linux Kernel SMP …
- Linux Kernel SMP …
- Linux Kernel SMP …
- Linux Kernel SMP …
- linux : error whi…
- linux ERROR 1045 …
- linux 脚本实例 …
- Squid 2.6 2.7 3.0 3.1 以及 varni…
- some online Linux learning mater…
- Top 10 Linux console application…
- QT opensource embedded linux 编…
- Linux Atheros AR8131 AR8132 网卡…
- linux shared library中获得自身和…
- How to write/use DLL in Linux sy…
- 当 今 中 国 的 深 层 悲 剧(转载…
- leetcode:Longest Increasing…
- leetcode:Multiply Strings +…
- leetcode:Permutations1+2 + Rotat…
- 用已有的caffemodel和python脚本进…
- leetcode:Pow(x, n) + N-Quee…
- linux中$* $@ 以及各自…
- leetcode:Simplify Path+Edit…
- C++虚函数的内存管理
- visual studio无法查看局部变…
- 将博客搬至CSDN
- 着色语言 Shading Language(二)
- 404页面怎么做?
- 移动商城第五篇【查看、删除、编辑品牌】
- PAT-1056 Mice and Rice (分组决胜问题)