码迷,mamicode.com
首页 > 系统相关 > 详细

shell脚本使用技巧7--cat

时间:2017-06-10 19:34:52      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:ext   --   text   脚本   技巧   std   nat   shell脚本   添加   

cat是单词concatenate缩写

echo ‘text through stdin‘ | cat - file.txt

输出:text throgh stdin 和file.txt中的内容;

 

cat -s file:压缩空白行

cat -T file:标记处文件中所有的制表符为^|

cat -n line.txt :输出的内容添加行号(不会改变文件的内容的)

 

shell脚本使用技巧7--cat

标签:ext   --   text   脚本   技巧   std   nat   shell脚本   添加   

原文地址:http://www.cnblogs.com/hujianglang/p/6979403.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!