리눅스 문자열 길이순 정렬

Jmnote (토론 | 기여)님의 2020년 3월 31일 (화) 17:53 판 (→‎개요)

1 개요

리눅스 문자열 길이순 정렬
$ awk '{ print length(), $0 | "sort -n" }'  /usr/share/dict/words
1 2
1 a
1 A
1 b
1 B
1 c
1 C
1 d
1 D
1 e
...
27 electroencephalographically
27 hydroxydesoxycorticosterone
27 microspectrophotometrically
28 antidisestablishmentarianism
28 hydroxydehydrocorticosterone
29 cyclotrimethylenetrinitramine
29 trinitrophenylmethylnitramine
30 half-embracinghalf-embracingly
31 dichlorodiphenyltrichloroethane
45 pneumonoultramicroscopicsilicovolcanoconiosis

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}