[root@bgx shell]# cat tt.sh #! /bin/bash test() { echo "未加引号,二者相同" echo $* echo $@ echo "加入引号后对比" echo "----"\$*----"" for N in "$*" do echo $N done echo "----"\$@----"" for N in "
which whereis locate find alias file ls cat echotar bzip2 gzip history mv cp rm --------------------------------------------------------------------------------------------------------------------------------------------------linux下的查找命令which,whereis
shell的echo指令是输出语句 就好比Python的print 在显示字符串的时候可以省略双引号 但是最好还是带上 echo ' Ti is a dashaobing' echo Ti is a dashaobing 这两个的输出的结果是一样的 2.显示转义字符 echo " \"IT is a dsb\"" 结果是: "IT is a dsb" 转义字符需要用双引号给括起来 同样还可以写成: echo \"IT is a ds
#!/bin/sh _________echo___________#read name #echo "$name It is a test" #read命令从标准的输入中读取一行,并把输入方的每个字段的值指定给shell变量#echo "OK! \n"#echo -e "OK! \n" # -e 开启转义#echo -e "ok! "#echo "It is a test !!!" > myfile