@H_404_4@
创建一个mytest.sh@H_404_4@
#!/bin/sh
echo "#:$#"
echo "0:$0"
echo "1:$1"
echo "2:$2"
echo "@:$@"
echo "*:$*"
echo "$:$$"
echo "?:$?"
@H_404_4@
@H_404_4@
2.再利用chmod +x 改变文件可执行权限。@H_404_4@
[root@localhost testutf8togdb]# ./mytest.sh
#:0
0:./mytest.sh
1:
2:
@:
*:
$:13584
?:0
[root@localhost testutf8togdb]# ./mytest.sh aa
#:1
0:./mytest.sh
1:aa
2:
@:aa
*:aa
$:14127
?:0
[root@localhost testutf8togdb]# ./mytest.sh aa bb
#:2
0:./mytest.sh
1:aa
2:bb
@:aa bb
*:aa bb
$:14369
?:0
[root@localhost testutf8togdb]# ./mytest.sh ./
#:1
0:./mytest.sh
1:./
2:
@:./
*:./
$:14514
?:0
[root@localhost testutf8togdb]# ./mytest.sh ./*
#:3
0:./mytest.sh
1:./change_gbk2utf8.sh
2:./change_utf8togbk.sh
@:./change_gbk2utf8.sh ./change_utf8togbk.sh ./mytest.sh
*:./change_gbk2utf8.sh ./change_utf8togbk.sh ./mytest.sh
$:14561
?:0
@H_404_4@
@H_404_4@
4.给出个变量的定义:@H_404_4@