¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 56°Ç
   
¾ÆÀÌÇÇ Á¤·Ä (¼ýÀÚÅ©±â ¹× ÀÚ¸´¼ö °í·Á)
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2010-10-01 (±Ý) 13:19 Á¶È¸ : 5809
±ÛÁÖ¼Ò :
                          

¿É¼Ç
       -n, --numeric-sort
              compare according to string numerical value

       -t, --field-separator=SEP
              use SEP instead of non-blank to blank transition

       -k, --key=POS1[,POS2]
              start a key at POS1, end it at POS2 (origin 1)


-n ¿É¼Ç¸¸À» »ç¿ëÇßÀ»¶§´Â...ÀÚ¸´¼ö¿¡ µû¸¥ Á¤·ÄÀÌ Àû¿ëµÇÁö ¾Ê´Â´Ù.
[root@mojily ~]# cat a |sort -n
58.237.81.86
59.1.83.178
112.171.211.176
112.71.211.176

115.86.233.33
117.53.248.34
118.217.30.100
118.42.46.209

119.71.79.165
121.157.183.162
121.168.221.8
121.200.120.189
122.34.36.23
125.180.166.145
175.199.89.198
180.227.86.26
180.68.72.69
183.100.235.160
183.197.51.16
183.97.51.16
218.147.123.153
218.157.167.131
218.236.115.201
219.248.64.41
221.164.25.141

¾Æ·¡¿Í°°ÀÌ Çʵ尪À» ÁÖ°í ÀÚ¸´¼ö Á¤·Ä
[root@mojily ~]# cat a |sort -n -t. -k 1,1 -k 2,2 -k 3,3 -k 4,4
58.237.81.86
59.1.83.178
112.71.211.176
112.171.211.176

115.86.233.33
117.53.248.34
118.42.46.209
118.217.30.100
119.71.79.165
121.157.183.162
121.168.221.8
121.200.120.189
122.34.36.23
125.180.166.145
175.199.89.198
180.68.72.69
180.227.86.26
183.97.51.16
183.100.235.160
183.197.51.16
218.147.123.153
218.157.167.131
218.236.115.201
219.248.64.41
221.164.25.141



À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.