#!/bin/bash # echo "how they are implemented and applied in computer systems systemsa" | sed 's/ /\n/g' | awk '/^.{1,7}$/' cat nowcoder.txt | sed 's/ /\n/g' | awk '/^.{1,7}$/' 既然题目说了不用担心空格和换行, 那咱们肯定不能用 awk 的 for 循环了, 那样多难看