I have a long list of strings like this:
_ah_
_asn_
_ai_
_errr_
_an_
And I would like to transform it like to this
"_ah_ai_an_",
"_asn_",
"_errr_"
I have tried :
cat file | awk '{ print length, $0 }' | sort -n -s | cut -d" " -f2-
Which essentially sort it by length but what I am trying to do is to have those of the same length on the same line with ","
As delimiters