æãã「ping -a」で音が鳴る!ããªã¨ã³ããªã§ãæ¸ããã®ã§ãããä½ããããªã¢ã«ã¿ã¤ã ã«ãã§ãã¯/ç£è¦ãããæã«ãè¦è¦ã ãã§ã¯ãªãã¢ã©ã¼ãé³ãä¸ç·ã«åºãã¨ãã¢ãã¿ãªã³ã°ãããããã®ã§ãã
ã¨ããããã§ãLinuxãªããã§ãã¨ãããã°ãã¡ã¤ã«ã®åºåãããããæååãæ¤åºãããéã«ããã¼ãé³ãé³´ããã¯ã³ã©ã¤ãã¼ã¯ä»¥ä¸ã
$ tail -f ãã°ãã¡ã¤ã« | sed -e 's/\(対象æåå\)/\1^G/'
ä¸è¨ãå®è¡ä¸ã«ãæå®ãã°ãã¡ã¤ã«ã«å¯¾è±¡æååãåºåãããã¨ãã¼ã(Beep)é³ãé³´ãã¯ãã
ã^Gã(0x07)ã®é¨åããASCIIã®BELãã£ã©ã¯ã¿ã®ãªãã©ã«ã§ãã
$ echo -n "^G"
ãªã©ã¨ãã¦ããã°ããã«(ãã¼ãé³)ãé³´ãã¾ãããã
ã¡ãªã¿ã«ãã^Gãã¯ã[Ctrl-V] â [Ctrl-G] ã®é ã«å
¥åãã¦ããã°OKãemacsã ã¨[Ctrl-Q] â [Ctrl-G]ããªã
人æã«ãããã°ç£è¦ï½ ããéçºæã®ãã¹ããªããã®ãä¾ã«ãããã§ããããã
ã¡ãã£ã¨å¿ç¨
ãã£ãããªã®ã§ãé³ã ãã§ã¯ãªãåºåãããæå表示ã«ã¢ã¬ã³ã¸ãå ããå ´åã¯ãã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ãæ´»ç¨ãã¾ãã
ä¾ãã°ãä¸è¨ã®ä¾ã¯ããã°å ã«"error"ã¨ããæååãåºåãããå ´åã«ããã¼ãé³ã¨ç»é¢(æ¨æºåºå)ã«è¡¨ç¤ºããã"error"ã®æååãå転ããã¦è¡¨ç¤ºãããã¨ãããã®ã
# tail -f /var/log/messages | sed -e 's/\(error\)/^[[7m\1^[[m^G/'
ã^[ãã¯ESCã示ãã¾ãããESC[7mãã¯ãªãã¼ã¹ãããªãã¡å転ã示ãã¨ã¹ã±ã¼ãã³ã¼ãã§ãããESC[mãã¯ãESC[0mãã¨åãæå³åãã§å±æ§ãç¡æå®ã«ãã(æå®å±æ§ãã¯ãªã¢ãã)æå³ã¨ãªãã¾ãã
ã¡ãªã¿ã«ãã^[ãã¯[Ctrl-V] â [ESC]ã§å
¥åãã¾ãã
ã»ã»ã»ã§ãçµæã¯ä»¥ä¸ã®ãããªæãã§ããå°ãç®ç«ã¤ããã«ãªãã¾ããã(# ããã©ãããã£ãã®ã§ãrootã§ä½æ¥ãã¡ãã£ãYO!ï½)
ã¨ã¹ã±ã¼ãã³ã¼ãã¯ãè¤æ°çµã¿åããããã¨ãã§ãããã®å ´åãã;ã(ã»ãã³ãã³)ã§åºåã£ã¦ããã¾ãã
ä¾ãã°ã以ä¸ã¯ãESC[4mã(ä¸ç·)ã¨ãESC[31mã(赤ã«è²ä»ã)ãçµã¿åãããä¾ã§ãã
# tail -f /var/log/messages | sed -e 's/\(error\)/^[[4;31m\1^[[m^G/'
çµæã¯ä»¥ä¸ã®ãããªæãããããç®ç«ã¡ã¾ããã
ãã®ä»ã®ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹(VT-100ã¨ãã¥ã¬ã¼ã·ã§ã³)ã«ã¤ãã¦ã¯ã以ä¸ã®ãªã³ã¯å ã詳ããã§ãããã£ã¨ã¢ã¬ã³ã¬ãããæ¹ã¯ãåèã¾ã§ã«ã
åèï¼US ASCII CODE LIST
+---------+---------+---------+---------+ |CHAR HEX |CHAR HEX |CHAR HEX |CHAR HEX | +---------+---------+---------+---------+ |NUL 0x00|SP 0x20|@ 0x40|` 0x60| |SOH 0x01|! 0x21|A 0x41|a 0x61| |STX 0x02|" 0x22|B 0x42|b 0x62| |ETX 0x03|# 0x23|C 0x43|c 0x63| |EOT 0x04|$ 0x24|D 0x44|d 0x64| |ENQ 0x05|% 0x25|E 0x45|e 0x65| |ACK 0x06|& 0x26|F 0x46|f 0x66| |BEL 0x07|' 0x27|G 0x47|g 0x67| |BS 0x08|( 0x28|H 0x48|h 0x68| |HT 0x09|) 0x29|I 0x49|i 0x69| |LF 0x0a|* 0x2a|J 0x4a|j 0x6a| |VT 0x0b|+ 0x2b|K 0x4b|k 0x6b| |NP 0x0c|, 0x2c|L 0x4c|l 0x6c| |CR 0x0d|- 0x2d|M 0x4d|m 0x6d| |SO 0x0e|. 0x2e|N 0x4e|n 0x6e| |SI 0x0f|/ 0x2f|O 0x4f|o 0x6f| |DLE 0x10|0 0x30|P 0x50|p 0x70| |DC1 0x11|1 0x31|Q 0x51|q 0x71| |DC2 0x12|2 0x32|R 0x52|r 0x72| |DC3 0x13|3 0x33|S 0x53|s 0x73| |DC4 0x14|4 0x34|T 0x54|t 0x74| |NAK 0x15|5 0x35|U 0x55|u 0x75| |SYN 0x16|6 0x36|V 0x56|v 0x76| |ETB 0x17|7 0x37|W 0x57|w 0x77| |CAN 0x18|8 0x38|X 0x58|x 0x78| |EM 0x19|9 0x39|Y 0x59|y 0x79| |SUB 0x1a|: 0x3a|Z 0x5a|z 0x7a| |ESC 0x1b|; 0x3b|[ 0x5b|{ 0x7b| |FS 0x1c|< 0x3c|\ 0x5c|| 0x7c| |GS 0x1d|= 0x3d|] 0x5d|} 0x7d| |RS 0x1e|> 0x3e|^ 0x5e|~ 0x7e| |US 0x1f|? 0x3f|_ 0x5f|DEL 0x7f| +---------+---------+---------+---------+ US ASCII CODE LIST
via. http://homepage1.nifty.com/pokke/pdocs/pd7.html
Linuxãµã¼ãHacksâããã使ããã¯ããã¯&ãã¼ã«100é¸
- ä½è : ããããªãã±ã³ã¬ã¼,Rob Flickenger,å±±å£æ´åº,ã¤ã¡ã¼ã¸ãºã¢ã³ãã¯ã¼ãº
- åºç社/ã¡ã¼ã«ã¼: ãªã©ã¤ãªã¼ã¸ã£ãã³
- çºå£²æ¥: 2003/11/01
- ã¡ãã£ã¢: åè¡æ¬
- è³¼å ¥: 4人 ã¯ãªãã¯: 56å
- ãã®ååãå«ãããã° (51件) ãè¦ã
- ä½è : Bill von Hagen,Brian K. Jones,è éè¯äº
- åºç社/ã¡ã¼ã«ã¼: ãªã©ã¤ãªã¼ã»ã¸ã£ãã³
- çºå£²æ¥: 2006/10/24
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- è³¼å ¥: 3人 ã¯ãªãã¯: 26å
- ãã®ååãå«ãããã° (31件) ãè¦ã