当前位置:网站首页>Awk from entry to burial (1) awk first meeting
Awk from entry to burial (1) awk first meeting
2022-07-03 02:14:00 【Wonderful binary】
Let's give you one first awk A simple example of , Let's get to know awk The basic structure of the command .
1、 First experience
Let's create a name marks.txt The file of . Including serial number 、 Student name 、 Course name and grades .
1) Amit Physics 80
2) Rahul Maths 90
3) Shyam Biology 87
4) Kedar English 85
5) Hari History 89
Next , We will use AWK Script to display the contents of the output file , At the same time, output header information .
[jerry]$ awk 'BEGIN{printf "Sr No\tName\tSub\tMarks\n"} {print} END{printf "----------------------------\n"}' marks.txt
After executing the above code , The following results will be output :
Sr No Name Sub Marks
1) Amit Physics 80
2) Rahul Maths 90
3) Shyam Biology 87
4) Kedar English 85
5) Hari History 89
----------------------------
Output multiple headers and split lines , Besides, it looks no different from the content of the source file . But this statement describes awk The basic structure of grammar , Let's introduce .
awk 'BEGIN{printf "Sr No\tName\tSub\tMarks\n"} {print} END{printf "---------------
边栏推荐
- [shutter] top navigation bar implementation (scaffold | defaulttabcontroller | tabbar | tab | tabbarview)
- LabVIEW安装第三方VISA软件后NI VISA失效
- SPI mechanism
- String replace space
- A 30-year-old software tester, who has been unemployed for 4 months, is confused and doesn't know what to do?
- 深度(穿透)选择器 ::v-deep/deep/及 > > >
- Trial setup and use of idea GoLand development tool
- CFdiv2-Fixed Point Guessing-(区间答案二分)
- ByteDance data Lake integration practice based on Hudi
- [shutter] pull the navigation bar sideways (drawer component | pageview component)
猜你喜欢

Learn BeanShell before you dare to say you know JMeter
![[shutter] hero animation (hero realizes radial animation | hero component createrecttween setting)](/img/e7/915404743d6639ac359bb4e7f7fbb7.jpg)
[shutter] hero animation (hero realizes radial animation | hero component createrecttween setting)

Bottleneck period must see: how can testers who have worked for 3-5 years avoid detours and break through smoothly

stm32F407-------IIC通讯协议

微服务组件Sentinel (Hystrix)详细分析

Performance test | script template sorting, tool sorting and result analysis

可视化yolov5格式数据集(labelme json文件)

Return a tree structure data

Distributed transaction solution

Introduce in detail how to communicate with Huawei cloud IOT through mqtt protocol
随机推荐
Trial setup and use of idea GoLand development tool
去除网页滚动条方法以及内外边距
Method of removing webpage scroll bar and inner and outer margins
内存池(内核角度理解new开辟空间的过程)
可視化yolov5格式數據集(labelme json文件)
苏世民:25条工作和生活原则
Wechat applet Development Tool Post net:: Err Proxy Connexion Problèmes d'agent défectueux
Button button adaptive size of wechat applet
Socket programming
Servlet中数据传到JSP页面使用el表达式${}无法显示问题
RestCloud ETL 跨库数据聚合运算
微信小程序開發工具 POST net::ERR_PROXY_CONNECTION_FAILED 代理問題
stm32F407-------IIC通讯协议
COM和CN
File class (check)
Exception handling in kotlin process
Technology sharing | Frida's powerful ability to realize hook functions
MySQL learning 03
8 free, HD, copyright free video material download websites are recommended
y54.第三章 Kubernetes从入门到精通 -- ingress(二七)