Shell 去除长短行

Shell 去除长短行

#!/bin/bash
cat test.txt | awk '{if (length($0) >10 ) print $0}' >c
#cat /home/词 | awk '{if (length($0) >=8 ) print $0}' >/home/词.txt
#cat /home/ci1.txt | egrep -w '^.{6,20}'> c
cat c | awk  '{if (length($0) <=20 ) print $0}' >d
#输出小于等于4的命令

# Shell   Script   awk  

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×