awk '{for (i=1; i<=NF; i++) arr[$i]++} END{for (idx in arr) print idx" "arr[idx]}' nowcoder.txt
利用 awk 和数组