awk, sed, xargs, bash

 
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.
 

转载于:https://www.cnblogs.com/yaoyaohust/p/10363211.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值