读书人

shell脚本学习(2)

发布时间: 2012-07-19 16:02:19 作者: rapoo

shell脚本学习(二)

1。linux中,使转义符生效,-e必须加上

echo -e "my name is wall-e \noh,i love\teve" > a.txtcat a.txt    my name is wall-e    oh,i love      everead firestname secondname thirdname  x z cecho -e "hello $firestname $secondname$thirdname"  hello  x zc

?2。tee命令把输出的一个副本送到标准输出,另一个拷贝到相应的文件中。

who | tee who.outecho "helo " > /dev/tty2
?

读书人网 >操作系统

热点推荐