12-6
能正常测试,但有以下错误
!# /bin/Bash应该是 #! /bin/sh
12-7
错误同12-6
12-7
read x,y应该改为read x y
12-9
演示不成功,执行结果如下
[root@bigdata111 bin]# ./test8
0
0
12-10正常.但有12-6错误
12-11正常.但有12-6错误
12-12使用gedit编辑时报错,使用vi可以正常.但又12-6错误
12-13
[root@bigdata111 bin]# ./test12
rm: cannot remove ‘/root/.Trash/*’: No such file or directory
/root/.Trash/* has been deleted!
12-14使用vi编辑正常.但有12-6错误
12-15没有演示
12-16正常,但是用的时vi
12-18无法执行
[root@bigdata111 bin]# ./test17
./test17: line 13: syntax error near unexpected token `newline'
./test17: line 13: `easc'
12-19正常但是用的是vi
[root@bigdata111 bin]# vi test18
#! /bin/sh
add()
{
a=$1
b=$2
z=` expr $a + $b`
echo "The sum is $z"
}
add $1 $2
12-20无法演示