À¯´Ð½º CSH ¿¡¼ ½ºÅ©¸³Æ®·Î ¹½Á» ÇÏ´Ù ¸·Çô¼ Áú¹° µå¸³´Ï´Ù..
ƯÁ¤ ÆÄÀÏÀÇ ¸¶Áö¸·¿¡ ¾Æ·¡¿Í °°Àº ¹®ÀåÀÌ ÀÖ½À´Ï´Ù.
TOTAL:39 (ALIVE:39, DEAD:0)
¿©±â¿¡¼ ¼ýÀÚ¸¸ Àоîµé¿© ÀúÀåÇÏ·Á°í ÇÑ´Ù¸é ¾î¶»°Ô ÇØ¾ß ÇÒ±î¿ä??
tail -1 ÀÔ·ÂÆÄÀÏ | awk ????????? >> Ãâ·ÂÆÄÀÏ
ÀÌ·± Çü½ÄÀ¸·Î ÇÏ¸é µÉ°Í °°Àºµ¥, awk ±¸¹®À» ¯±¸¸¦ ±¼·ÁºÁµµ Àß ¸ð¸£°Ú³×¿ä..
°í¼ö´Ôµé ÈƼö ºÎŹµå¸³´Ï´Ù~
µô¸®¹ÌÅÍ°¡ ½ºÆäÀ̽º·Î È®½ÇÇÏ°Ô ±¸ºÐµÇ¸é ;;
total:39 ( alive:39 , dead:0 ) À¸·Î ÀúÀåÇÏ½Ç ¼ö ÀÖÀ¸¸é
^ ^ ^ ^ ^
tail -1 test.txt | awk '{print substr($1, index($1,":")+1,length($1)), substr($3, index($3, ":")+1, length($3)), substr($5, index($5, ":")+1, length($5))}'
ÀÌ·¸°Ô :¸¦ ±âÁ¡À¸·Î Àüü ¹®Àå ±æÀ̸¸Å À߶ó¹ö¸®¸é ¼ýÀÚ¸¸ ³²°Ô µË´Ï´Ù.. Äð·°
Áö±ÝÀÇ »óÅ ( total:39 (alive:39, dead:0) ) ÀÇ »óŶó¸é $1 $2 $3 À¸·Î °É·¯³»½Ã¸é µÇ°í
ÀÌ °æ¿ì 39 39, 0) ÀÌ ³²½À´Ï´Ù.
À̳༮µéÀ» ´Ù½Ã ¼ýÀÚ°¡ ¾Æ´Ñ°æ¿ì ¹ö¸°´Ù. ȤÀº ³Î·Î ó¸®ÇÑ´Ù¸¦ Á¤±ÔÇ¥Çö½ÄÀ¸·Î Àß Â¥ºÎÇϽøé
¿øÇÏ´Â 39 39 0 ÀÌ ³²Áö ¾ÊÀ»±î ½Í½À´Ï´Ù.
tail -1 test1.txt | sed -r 's/[a-z:,()]//ig'