3、将for_exam9.sh中输入的命令行参数改为‘1 2’,3,查看输出结果是否与原来相同;
for_exam9.sh:
#!/bin/bash
#Prompts the user to input the number of parameters
echo "Number of arguments is $#:"
#Prompts the user to input
echo "What you input is:"
for argument
do
echo "$argument"
done
输出为:
[root@Shell example]# ./3.sh '1 2' 3
Number of arguments is 2:
What you input is:
1 2
3
