sed '/^\s*$/d' a.txt # delete ALL blank lines
sed '/./,$!d' a.txt # delete all leading blank lines at top of file
sed '=' a.txt | sed 'N;s/\n/\t/' # cat -n a.txt
sed '/./=' a.txt | sed '/./N; s/\n/\t/' # number each not blank line of file
sed '1!G;h;$!d' a.txt # reverse order of lines
sed '/./,$!d' a.txt # delete all leading blank lines at top of file
sed '$!N; /^\(.*\)\n\1$/!P; D' a.txt # delete duplicate, consecutive lines
gawk '$1~/[0-9].*/{total += $2} END{print total}' a.txt
gawk 'BEGIN {"cat c.txt | wc -l"|getline n} n>10 {print}' a.txt
ls | gawk -F. '{system("mv " $0 " " sprintf("%03d", $1) "." $2)}
分享到:
相关推荐
openssl generate a new private key and matching Certificate Signing Request (eg to send to a commercial CA)
matlab 常用命令 matlab 常用命令 (frequently used commands commonly used commands matlab matlab)
OpenSSL Cookbook_ A guide to the most frequently used OpenSSL features and commands (2013).pdf
口语常用英语动词,感兴趣的话可以下下去看看
You can easily organize prompt windows, use Windows style text editing behavior, auto-log, highlight keywords, configure font and colors, customize a toolbar for frequently used commands or tools, ...
A Guide to the Most Frequently Used OpenSSL Features and Commands
Frequently Asked Questions for FreeBSD.pdf
Frequently-used-code-blocks Some frequently used code blocks. Python project structure for a learning paper Reference: , Self's AnomalyDetection - Dataset(Fold) - 保存和处理真实数据集 - dataset1(Fold)...
一些经常会用到的C程序代码,或许对你有帮助
强大的C++ IDE 帮助工具。 1.Visual Assist X simplifies large tasks by ... Type a shortcut to expand frequently used snippets of code. Visual Assist X has many features to help you code efficiently 3. etc
What You Will LearnDevelop containerized applications using the Docker version 17.03Build Docker images from containers and launch ...yourself with the frequently used commands such as docker exec...
It can be used for a wide range of programming tasks and is best suited to produce data and visual analytics through customizable scripts and commands. The purpose of the book is to explore the core...
Familiarize yourself with the frequently used commands such as docker exec, docker ps, docker top, and docker stats In Detail Docker is an open source containerization engine that offers a simple ...
verilog常见问题,看完面试不用愁,强烈推荐,绝对好书,对数字IC设计和FPGA开发都非常有用,欢迎下载
verilog frequently asked questions
35. Where can I find information about available, used and deprecated features? 36. Does SAP HANA provide a history of DDL operations? 37. What is the difference between the SAP HANA enterprise ...
4) 最不经常使用法(Least Frequently Used) 5) 最近未使用法(No Used Recently) 其中,命中率=1-页面失效次数/页地址流长度。试对上述算法的性能加以较:页面个数和命中率间的关系;同样情况下的命中率...
Unfortunately, these techniques are not frequently used because filtering is thought to require considerable computation. This paper presents a simple algorithm that can be used to draw filtered ...
Binder Frequently Asked Questions
BREW frequently asked question