-
用 cat 读取文件内容的一般写法
cat file1 file2 file3 ...
-
将来自输入文件的内容与标准输入拼接在一起
echo 'Text through stdin' | cat - file.txt #- 被作为 stdin 文本的文件名
-
摆脱多余的空白行
cat -s file
-
将制表符显示为^I
cat -t file
-
行号
cat -n file #会为空白行也加上行号 cat -b file #会跳过空白行
用 cat 读取文件内容的一般写法
cat file1 file2 file3 ...
将来自输入文件的内容与标准输入拼接在一起
echo 'Text through stdin' | cat - file.txt #- 被作为 stdin 文本的文件名
摆脱多余的空白行
cat -s file
将制表符显示为^I
cat -t file
行号
cat -n file #会为空白行也加上行号
cat -b file #会跳过空白行
本文标题:2.2 用 cat 进行拼接
本文链接:https://www.haomeiwen.com/subject/dcztpqtx.html
网友评论