最简方法

#! /bin/bash
cat nowcoder.txt | awk NF

法2

#! /bin/bash
awk '{if($0!="") {print $0 }}' nowcoder.txt