"리눅스 문자열 길이순 정렬"의 두 판 사이의 차이

(새 문서: ==개요== ;리눅스 문자열 길이순 정렬 <source lang='console'> $ awk '{ print length(), $0 | "sort -n" }' /usr/share/dict/words ... 29 cyclotrimethylenetrinitramine 29 tri...)
 
 
(사용자 2명의 중간 판 3개는 보이지 않습니다)
2번째 줄: 2번째 줄:
;리눅스 문자열 길이순 정렬
;리눅스 문자열 길이순 정렬


<source lang='console'>
<syntaxhighlight lang='console'>
$ awk '{ print length(), $0 | "sort -n" }' /usr/share/dict/words
$ 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 cyclotrimethylenetrinitramine
29 trinitrophenylmethylnitramine
29 trinitrophenylmethylnitramine
10번째 줄: 25번째 줄:
31 dichlorodiphenyltrichloroethane
31 dichlorodiphenyltrichloroethane
45 pneumonoultramicroscopicsilicovolcanoconiosis
45 pneumonoultramicroscopicsilicovolcanoconiosis
</source>
</syntaxhighlight>
 


==같이 보기==
==같이 보기==
22번째 줄: 36번째 줄:


[[분류: awk]]
[[분류: awk]]
[[분류: Bash 정렬]]

2023년 9월 17일 (일) 12: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 }}