°Ô½Ã¹° 42°Ç
   
bash ¸í·É ¿¬»êÀÚ [ eq gt ge ]
±Û¾´ÀÌ : theko ³¯Â¥ : 2016-11-21 (¿ù) 17:18 Á¶È¸ : 4256

 -> test ¸í·É ¿¬»êÀÚ


      => ¹®ÀÚ¿­ °Ë»ç                                                              

          [ string1 = string2 ]  : string1Àº string2¿Í °°´Ù                     

          [ string1 == string2 ] : string1Àº string2¿Í °°´Ù                            

          [ string1 != string2 ] : string1Àº string2¿Í ´Ù¸£´Ù                   

                                   (!= ¾çÁ·¿¡´Â ½ºÆäÀ̽º¸¦ »ç¿ëÇÏ¿©¾ß ÇÑ´Ù )        

          [ string ]             : stringÀº ³ÎÀÌ ¾Æ´Ï´Ù                          

          [ -z string ]          : stringÀÇ ±æÀÌ°¡ 0 ÀÌ´Ù                        

          [ -n string ]          : stringÀÇ ±æÀÌ°¡ 0ÀÌ ¾Æ´Ï´Ù                    

          [ -l string ]          : stringÀÇ ±æÀÌ(¹®ÀÚÀÇ °³¼ö)                    


      => ³í¸® °Ë»ç                                                                

          [ string1 -a string2 ] : and ¿¬»êÀÚ                                   

          [ string1 -o string2 ] : or ¿¬»êÀÚ                                    

          [ ! string1 ]          : not ¿¬»êÀÚ                                  


      => ³í¸®°Ë»ç(º¹ÇÕ test ¸í·É)                                                  

          [[ pattern1 && pattern2 ]] : pattern1°ú pattern2°¡ ¸ðµÎ Âü                

          [[ pattern1 || pattern2 ]] : pattern1°ú pattern2 Áß¿¡ Çϳª°¡ Âü            

          [[ ! pattern ]]            : pattern°ú °°Áö ¾Ê´Ù                          


      => Á¤¼ö °Ë»ç                                                                

          [ int1 -eq int2 ]          : int1Àº int2¿Í °°´Ù                           

          [ int1 -ne int2 ]          : int1Àº int2¿Í ´Ù¸£´Ù                         

          [ int1 -gt int2 ]          : int1Àº int2º¸´Ù Å©´Ù                         

          [ int1 -ge int2 ]          : int1Àº int2º¸´Ù Å©°Å³ª °°´Ù                   

          [ int1 -lt int2 ]          : int1Àº int2º¸´Ù ÀÛ´Ù                         

          [ int1 -le int2 ]          : int1Àº int2º¸´Ù À۰ųª °°´Ù                  


      => ÆÄÀÏ °Ë»ç¸¦ À§ÇÑ ÀÌÇ× ¿¬»êÀÚ                                               

          [ file1 -nt file2 ]        : file1ÀÌ file2º¸´Ù »õ·Î¿î ÆÄÀÏÀ̸é Âü           

          [ file1 -ot file2 ]        : file1ÀÌ file2º¸´Ù ¿À·¡µÈ ÆÄÀÏÀ̸é Âü           

          [ file1 -ef file2 ]        : file1°ú file2°¡ µ¿ÀÏÇÑ ÀåÄ¡À̰ųª °°Àº


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

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com