cat 的用途很多,文件编辑的时候也常常使用。
1. 查看文件
$ cat daily_log
just for myself
I just love u
end
(行数较多的时候可以使用more或less 分屏查看)
2. 拼接文件
$ cal 1 2011 > 1
$ cal 2 2011 > 2
$ cat 1 2 > calender
(把2个月的日历输出到calender里面)
$ cat calendar
(查看calender文件)
January 2011
Su Mo Tu We Th Fr Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
February 2011
Su Mo Tu We Th Fr Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28
”>“和”>>“的区别:
> :是重定向符,会覆盖旧的文件以后再写入新的内容
>> : 是追加符,添加在文件尾部
3. 常用通道
-n 对显示的所有行进行编号
$ cat daily_log
1 just for myself
2 I just love u
3 end
-s 合并空白行
分享到:
相关推荐
Seventh Edition Unix, also called Version 7 Unix, Version 7 or just V7, was an important early release of the Unix operating system. V7, released in 1979, was the last Bell Laboratories release to see...
Learning the Unix Operating System is a handy book for someone just starting with Unix or Linux, and it's an ideal primer for Mac and PC users of the Internet who need to know a little about Unix on ...
In just 24 lessons of one hour or less, Sams Teach Yourself Unix in 24 Hours helps you get up and running with Unix and Unix-based operating systems such as Mac OS X and Linux.Designed for beginners...
It's not just a collection of recipes (such collections tend to leave you hanging if you want to do something a little differently), it's not just a book of documentation (books like that have ...
Just
justtrustme v4版本
UNIX end-users desperately need an up-to-date reference guide with real depth: one that teaches UNIX commands and doesn't just list them! In UNIX User's Handbook, second edition, best-selling UNIX ...
Shell Programming QuickStart: makes first-time shell programmers productive in just 15 pages Complete, practical debugging chapter Updated coverage of the latest UNIX and GNU/Linux versions of awk, ...
When you use Unix, you are interacting with these people, just as surely as you are interacting with me as you read this page. Unix and Linux are wonderful because they were developed by bright, ...
Besides just doing macro expansion m4 has builtin functions for including named files, running UNIX commands, doing integer arithmetic, manipulating text in various ways, recursion etc... m4 can be ...
Just Hibernate
just trust me用来解决ssl认证的问题,懂得都懂
JustTrustMe是Github上的一个开源工程,他是一个Xposed模块,用来禁止SSL证书验证。以下是其简介。 JustTrustMe:An xposed module that disables SSL certificate checking. This is useful for auditing an ...
a copy on putty. just for windows and linux ssh.
I just got my hands on a copy, and the first few chapters have been fascinating."--Open Systems Today"A much more readable and detailed treatment of UNIX internals can be found in Advanced ...
I just got my hands on a copy, and the first few chapters have been fascinating."--Open Systems Today"A much more readable and detailed treatment of UNIX internals can be found in Advanced ...
Not just a toy
just back.crx
ImageJ是一款基于JAVA开发的图像处理工具,Fiji(Fiji is just ImageJ)集成了更强大的图像处理功能。版本为windows 64位。
JustTrustMe 3.0 自适配Hook混淆后的网络请求库代码(自适配okhttp)