awk, sed, xargs, bash
2024-09-02 08:35:33
awk:
split($1, arr, “\t”)
sed:
sed -n '42p' file
sed '42d' file
sed 's/replace_pattern/replace_str/g' file
sed '/remove_pattern/d' file
sed -i file #(inplace)直接修改读取的文件内容,而不是输出到终端
xargs:
xargs -n1 -i cmd {}
bash:
- $HOSTNAME - The hostname of the machine the script is running on.
- Single quotes will treat every character literally.
- Double quotes will allow you to do substitution (that is include variables within the setting of the value).
- read varNameRead input from the user and store it in the variable varName./dev/stdinA file you can read to get the STDIN for the Bash script
- $(( expression )) Return the result of the expression. ${#var} Return the length of the variable var.
最新文章
- 复习(2)【postman,charles,filezilla server】
- 判断手机端用户打开页面时是android还是ios,并将判断结果通过ajax返回给url接口,传递回去
- Linq 动态查询排序
- Open vSwitch实践——VLAN
- TargetProcess公司敏捷开发历程-开发实践篇
- SPFile的使用
- iptables常用命令
- Project Euler:Problem 55 Lychrel numbers
- JavaSE学习总结第16天_集合框架2
- Spring源码情操陶冶-AbstractApplicationContext#finishRefresh
- Python进阶:全面解读高级特性之切片!
- systemd服务详解-技术流ken
- JMeter 参数化之利用CSV Data Set Config从文件读取参数并关联变量
- 背景图片自适应整个页面CSS+DIV
- Linux进程间通信之管道(pipe)、命名管道(FIFO)与信号(Signal)
- js replace replaceAll
- 设置zedgraph鼠标拖拽和局部放大属性(转帖)
- windows7使用Sphinx+PHP+MySQL详细介绍
- linux网卡的开启
- php strcmp()函数