- 输出
echo "abcdf"
- 显示变量
read name
echo "name is $name "
- 显示结果定向至文件
read name
echo "$name">1.txt
- 显示命令行执行结果
echo `date`>t1.txt
out:Thu Jul 24 10:08:46 CST 2014
- 多个参数输入
read firstStr secondStr
echo "第一个参数:$firstStr; 第二个参数:$secondStr"
echo "abcdf"
read name
echo "name is $name "
read name
echo "$name">1.txt
echo `date`>t1.txt
out:Thu Jul 24 10:08:46 CST 2014
read firstStr secondStr
echo "第一个参数:$firstStr; 第二个参数:$secondStr"
本文标题:06shell echo
本文链接:https://www.haomeiwen.com/subject/kwyjdftx.html
网友评论