You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried your example for sorting from largest to smallest:
cat dictionary.txt | awk '{ print length, $0 }' | sort -g -r | cut -d" " -f2 > sorted_dictionary.txt
with the example text:
A
A รหัส A
AB
ABC
and the result is:
A
ABC
AB
A
with "รหัส A" deleted.
A possible kludge that I came up is: cat dictionary.txt | awk '{ print length, $0 }' | sort -g -r | sed 's/^ *//' | cut -d" " -f2- > sorted_dictionary.txt
The text was updated successfully, but these errors were encountered:
I tried your example for sorting from largest to smallest:
cat dictionary.txt | awk '{ print length, $0 }' | sort -g -r | cut -d" " -f2 > sorted_dictionary.txt
with the example text:
A
A รหัส A
AB
ABC
and the result is:
A
ABC
AB
A
with "รหัส A" deleted.
A possible kludge that I came up is:
cat dictionary.txt | awk '{ print length, $0 }' | sort -g -r | sed 's/^ *//' | cut -d" " -f2- > sorted_dictionary.txt
The text was updated successfully, but these errors were encountered: