我有个 CSV 档案看起来像这样
AS2345,ASDF1232, Mr. Plain Example, 110 Binary ave.,Atlantis,RI,12345,(999)123-5555,1.56 AS2345,ASDF1232, Mrs. Plain Example, 1121110 Ternary st. 110 Binary ave..,Atlantis,RI,12345,(999)123-5555,1.56 AS2345,ASDF1232, Mr. Plain Example, 110 Binary ave.,Liberty City,RI,12345,(999)123-5555,1.56 AS2345,ASDF1232, Mr. Plain Example, 110 Ternary ave.,Some City,RI,12345,(999)123-5555,1.56
我需要按行长(包括空格)对它进行排序 包括空格,是否有一种方法来修改它,以便它将为我工作?
cat $@ | awk '{ print length, $0 }' | sort -n | awk '{$1=""; print $0}'