题解 | #打印空行的行号#
打印空行的行号
https://www.nowcoder.com/practice/030fc368e42e44b8b1f8985a8d6ad255
#!/bin/bash awk 'NF == 0 {print NR}' nowcoder.txt # grep -n '^$' nowcoder.txt | awk -F: '{print $1}' # sed -n '/^$/=' nowcoder.txt
打印空行的行号
https://www.nowcoder.com/practice/030fc368e42e44b8b1f8985a8d6ad255
#!/bin/bash awk 'NF == 0 {print NR}' nowcoder.txt # grep -n '^$' nowcoder.txt | awk -F: '{print $1}' # sed -n '/^$/=' nowcoder.txt
相关推荐