linux下查找文件中空行的行号 linux下查找文件中空行的行号 以aa.txt举例: 方法1:sed -n '/[a-zA-Z0-9@#$%^&*]/!=' aa.txt 方法2:grep -n ^$ aa.txt 方法3:awk '/^$/{print NR}' aa.txt 方法4:sed ...
分类:
系统相关 时间:
2020-12-07 12:22:19
阅读次数:
9
linux下查找文件中空行的行号以aa.txt举例:方法1:sed-n‘/[a-zA-Z0-9@#$%^&*]/!=‘aa.txt方法2:grep-n^$aa.txt方法3:awk‘/^$/{printNR}‘aa.txt方法4:sed-n‘/^$/=‘aa.txt
分类:
系统相关 时间:
2016-02-29 16:46:19
阅读次数:
167