|
在以下两个shell中
- $pg forlist
- #!/bin/sh
- for loop in "orange red blue"
- do
- echo "This is the fruit $loop"
- done
- $forlist
- This is the fruit orange red blue
复制代码
- $pg forparam
- #打印参数
- #!/bin/sh
- for params
- do
- echo "You supplied supplied $params as s command line option"
- do
- $forparam file1 file2 file3
- You supplied supplied file1 as s command line option
- You supplied supplied file2 as s command line option
- You supplied supplied file3 as s command line option
复制代码
请问第一个例中了不是输出
This is the fruit orange
This is the fruit red
This is the fruit blue |
|