当前位置:网站首页>awk从入门到入土(2)认识awk内置变量和变量的使用
awk从入门到入土(2)认识awk内置变量和变量的使用
2022-07-03 02:13:00 【奇妙之二进制】
学习任何一门语言都是从变量开始。
内置变量表
属性 | 说明 |
---|---|
$0 | 当前记录(作为单个变量) |
1 1~ 1 n | 当前记录的第n个字段,字段间由FS分隔 |
FS | 输入字段分隔符 默认是空格 |
NF | 当前记录中的字段个数,就是有多少列 |
NR | 已经读出的记录数,就是行号,从1开始 |
RS | 输入的记录的隔符默 认为换行符\n |
OFS | 输出字段分隔符 默认也是空格 |
ORS | 输出的记录分隔符,默认为换行符 |
边栏推荐
- [Yu Yue education] China Ocean University job search OMG reference
- 苏世民:25条工作和生活原则
- 创建+注册 子应用_定义路由,全局路由与子路由
- Cfdiv2 Fixed Point Guessing - (2 points for Interval answer)
- Rockchip3399 start auto load driver
- 树形结构数据的处理
- 【Camera专题】手把手撸一份驱动 到 点亮Camera
- How to refresh the opening amount of Oracle ERP
- String replace space
- 微信小程序開發工具 POST net::ERR_PROXY_CONNECTION_FAILED 代理問題
猜你喜欢
Y54. Chapter III kubernetes from introduction to mastery -- ingress (27)
Use go language to realize try{}catch{}finally
Distributed transaction solution
Job object of collaboration in kotlin
[camera topic] how to save OTP data in user-defined nodes
8 free, HD, copyright free video material download websites are recommended
[camera topic] complete analysis of camera dtsi
RestCloud ETL 跨库数据聚合运算
Servlet中数据传到JSP页面使用el表达式${}无法显示问题
Stm32f407 ------- IIC communication protocol
随机推荐
各国Web3现状与未来
PyTorch 卷积网络正则化 DropBlock
机器学习流程与方法
Internal connection query and external connection
Wechat applet development tool post net:: err_ PROXY_ CONNECTION_ Failed agent problem
疫情當頭,作為Leader如何進行團隊的管理?| 社區征文
Solution for processing overtime orders (Overtime unpaid)
stm32F407-------ADC
CFdiv2-Fixed Point Guessing-(区间答案二分)
require. context
CFdiv2-Fixed Point Guessing-(區間答案二分)
What are the key points often asked in the redis interview
8 free, HD, copyright free video material download websites are recommended
The testing process that software testers should know
COM和CN
Leetcode 183 Customers who never order (2022.07.02)
[leetcode] 797 and 1189 (basis of graph theory)
[Yu Yue education] Jiujiang University material analysis and testing technology reference
Trial setup and use of idea GoLand development tool
How do browsers render pages?