shell按字符串长度排序一个文本 moneyslow 6 years ago 假设文本文件a.txt: awk ' { print length, $0}' a.txt | sort -n | sed 's/.* //'