shell编程,记录输出的消息,tee命令
来源:原创
时间:2017-10-26
作者:脚本小站
分类:SHELL
tee 可以将数据即输出在屏幕上又可以保存在文件中,例:date | tee filename
-a 追加数据,默认会替换文本中现有的数据,此选项可以将数据追加到文本中
例1:date | tee -a demo.txt
例2:
echo "This is a message" | tee demo.txt
echo "This is a infomation" | tee -a demo.txt
- lvs开机自启动脚本
- shell编程,对bash脚本进行语法检测
- shell编程,信号的捕获修改和移除,trap命令,在脚本中处理信号
- linux的shell,which,type,history,alias,coproc后台模式,协程,子shell
- shell编程,获得用户输入read命令
- shell编程,if-then、else,case,数值、字符串、文件类型比较检测,[ ],(()),[[ ]]
- shell编程,以后台模式运行进程,bg、fg、jobs -l、nohup、&
- nginx服务自启动脚本
- shell 删除空目录
- shell编程,处理用户输入,选项和参数的处理getopts,shift,常见的linux命令选项