echo string
echo "It is a test"
echo It is a test
echo "\"It is a test\""
"It is a test"
#!/bin/sh
read name
echo "$name It is a test"
[root@www ~]# sh test.sh
OK #标准输入
OK It is a test #输出
echo -e "OK! \n" # -e 开启转义
echo "It is a test"
OK!
It is a test
#!/bin/sh
echo -e "OK! \c" # -e 开启转义 \c 不换行
echo "It is a test"
OK! It is a test
echo "It is a test" > myfile
echo '$name\"'
$name\"
echo `date`
Thu Jul 24 10:08:46 CST 2014
欢迎光临 大内高手社区 (https://bbs.tedu.cn/) | Powered by Discuz! X3.4 |