html tool

2017年4月23日星期日

tee标准输出

add:http://codingstandards.iteye.com/blog/833695

常用参数

格式:tee
只输出到标准输出,因为没有指定文件嘛。

格式:tee file
输出到标准输出的同时,保存到文件file中。如果文件不存在,则创建;如果已经存在,则覆盖之。(If a file being written to does not already exist, it is created. If a file being written to already exists, the data it previously
contained is overwritten unless the `-a' option is used.)

格式:tee -a file
输出到标准输出的同时,追加到文件file中。如果文件不存在,则创建;如果已经存在,就在末尾追加内容,而不是覆盖。

格式:tee -
输出到标准输出两次。(A FILE of `-' causes `tee' to send another copy of input to standard output, but this is typically not that useful as the copies are interleaved.)

格式:tee file1 file2 -
输出到标准输出两次,同时保存到file1和file2中。

没有评论:

发表评论