abc 567 aaa bbb ccc
#!/bin/bash awk '/./{print}' nowcoder.txt
grep -Ev '^$' nowcoder.txt
#!/bin/bash IFS=$'\n' for i in $(cat nowcoder.txt) do echo $i done
grep -v '^$' awk '!/^$/' sed -n '/[^$]/p' sed '/^$/d'
awk '$1 ~ /^\S+$/ {print $1}' nowcoder.txt
awk '$1 !~ /^\S*$/ {print $1}' nowcoder.txt
sed '/^$/d' nowcoder.txt awk -v RS='\n+' '{print $0}' nowcoder.txt
sed -n '/^[^$]/p' nowcoder.txt
sed -n '/^$/!p' nowcoder.txt
sed '/^$/d' awk '!/^$/{print}'
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题