shell脚本学习(二)

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

echo -e "my name is wall-e \noh,i love\teve" > a.txt
cat a.txt
    my name is wall-e
    oh,i love      eve

read firestname secondname thirdname
  x z c
echo -e "hello $firestname $secondname$thirdname"
  hello  x zc

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

who | tee who.out
echo "helo " > /dev/tty2
 

你可能感兴趣的:(linUX,脚本,Linux,C,C++,C#)