shell按字符串长度排序一个文本

假设文本文件a.txt:

awk ' { print length, $0}' a.txt | sort -n | sed 's/.* //'

京ICP备11047313号-19
Scroll to Top