Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Àí½âlinux trÃüÁî

1. tr ÃüÁîµÄ¹¦ÄÜ
trÃüÃûÊǼò»¯Á˵ÄsedÃüÁî¡£ÆäÖ÷ÒªµÄ¹¦ÄÜ°üÀ¨£º
a. ÓÃÒ»¸ö×Ö·ûÀ´Ìæ»»ÁíÍâÒ»¸ö×Ö·û¡£
b. ɾ³ý×Ö·û´®ÖеÄÖ¸¶¨×Ó´®¡£
c. ºÏ²¢×Ö·û´®ÖÐÖظ´´®¡£
2. ³£¼ûµÄÃüÁî¸ñʽ£º
tr -c -d -s ["string1_to_translate_from"] ["string2_to_translate_to"] < input-file
-c ÓÃ×Ö·û´®1ÖÐ×Ö·û¼¯µÄ²¹¼¯Ìæ»»´Ë×Ö·û¼¯£¬ÒªÇó×Ö·û¼¯ÎªASCII¡£
-d ɾ³ý×Ö·û´®1ÖÐËùÓÐÊäÈë×Ö·û¡£
-s ɾ³ýËùÓÐÖظ´³öÏÖ×Ö·ûÐòÁУ¬Ö»±£ÁôµÚÒ»¸ö£»¼´½«Öظ´³öÏÖ×Ö·û´®Ñ¹ËõΪһ¸ö×Ö·û´®¡£
input-fileÊÇת»»ÎļþÃû¡£ËäÈ»¿ÉÒÔʹÓÃÆäËû¸ñʽÊäÈ룬µ«ÕâÖÖ¸ñʽ×î³£Óá£
Ö¸¶¨×Ö·û´®1»ò×Ö·û´®2µÄÄÚÈÝʱ£¬Ö»ÄÜʹÓõ¥×Ö·û»ò×Ö·û´®·¶Î§»òÁÐ±í¡£
[a-z] a-zÄÚµÄ×Ö·û×é³ÉµÄ×Ö·û´®¡£
[A-Z] A-ZÄÚµÄ×Ö·û×é³ÉµÄ×Ö·û´®¡£
[0-9] Êý×Ö´®¡£
\octal Ò»¸öÈýλµÄ°Ë½øÖÆÊý£¬¶ÔÓ¦ÓÐЧµÄASCII×Ö·û¡£
[O*n] ±íʾ×Ö·ûOÖظ´³öÏÖÖ¸¶¨´ÎÊýn¡£Òò´Ë[O*2]Æ¥ÅäOOµÄ×Ö·û´®¡£
trÖÐÌض¨¿ØÖÆ×Ö·ûµÄ²»Í¬±í´ï·½Ê½
ËټǷûº¬Òå°Ë½øÖÆ·½Ê½
\a Ctrl-G  ÁåÉù\007
\b Ctrl-H  Í˸ñ·û\010
\f Ctrl-L  ×ßÐл»Ò³\014
\n Ctrl-J  ÐÂÐÐ\012
\r Ctrl-M  »Ø³µ\015
\t Ctrl-I  tab¼ü\011
\v Ctrl-X  \030
3. ¾ÙÀý˵Ã÷
a. ºÏ²¢×Ö·û´®ÖÐÖظ´³öÏÖµÄ×Ö·û
   tr -s "[\n]" < input.txt    #Îļþinput.txtÖеÄËùÓÐÖظ´³öÏֵĻ»Ðзû×î¶àÖ»³öÏÖÒ»´Î¡£
   echo aaaabbbbccccddddddd | tr -s "[a-z]"    #Êä³öabcd
b. ɾ³ý×Ö·û´®ÖеÃ×Ö·û
   echo helloworld | tr -d "o"  #Êä³öhellwrld
   ×¢Òâecho helloworld | tr -d "hello"µÄÊä³ö½á¹ûÊÇwrd£¬Òò´ËtrÊǽ«×Ö·û´®1µÄ¸÷¸ö×Ö·û´®µ¥¶À´¦ÀíµÄ
c. ×Ö·û´®µÄÌæ»»
   ¼ÙÉèinput.txtÖÐÄÚÈÝÊÇa:b:c:d:e£¬ÄÇôÔËÐÐtr -s "[:]" "[\t]" < input.txtµÄ½á¹û½«ÊÇa  b  c  d£¬¸÷¸ö×Ó´®¼äÒÔtab¸ô¿ª¡£Í¬ÑùµÄ³öÏÖÔÚ×Ö·û´®1ºÍ×Ö·û´®2ÖеÄ×Ö·û¶¼Êǵ¥¸ö´¦ÀíµÄ£¬²¢²»Êǽ«Ö®¿´³ÉÊÇÒ»¸öÕûÌå¡£
   ÔÚviÖÐÒ²ÄÜʹÓÃtrÃüÁµ«ÔÚ¸ÃÃüÁîÇ°Òª¼ÓÉÏÒª´¦ÀíµÄÐз¶Î§ºÍ!£¬ÀýÈç1,$!tr -s "[\r]" "[\n]" ($±íʾ×îºóÒ»ÐУ©


Ïà¹ØÎĵµ£º

oracle for linux°²×°

ÕÛÌÚÁËÁ½¸öÍíÉϵÄlinuxºÍoralce£¬×ÜËã³öÀ´µã¶«Î÷ÁË¡£Oralce°²×°ÒªÑ¡ÓÃÊÊÓõİ汾£¬²»È»°²×°²»»á³É¹¦£¬×îºóÎҵľö¶¨ÊÇlinuxÑ¡ÓÃcentos 5.0£¬oracleÑ¡ÓÃ10¡£
Ò»¡¢        ×¼±¸¹¤×÷£º
1.       ʹÓÃrootÓû§µÇ¼
ÎÒʹÓõÄÊÇÔÚ±¾»ú×°£¬ËùÒÔÖ±½Ó´ò¿ªÖÕ¶Ë¾Í ......

ÈçºÎ±àÒëLinuxµÄÄÚºË

ÈçºÎ±àÒëLinuxµÄÄÚºË. Äںˣ¬ÊÇÒ»¸ö²Ù×÷ϵͳµÄºËÐÄ¡£Ëü¸ºÔð¹ÜÀíϵͳµÄ½ø³Ì¡¢ÄÚ´æ¡¢ É豸Çý¶¯³ÌÐò¡¢ÎļþºÍÍøÂçϵͳ£¬¾ö¶¨×ÅϵͳµÄÐÔÄܺÍÎȶ¨ÐÔ¡£Linux×÷Ϊһ¸ö×ÔÓÉÈí¼þ£¬ ÔÚ¹ã´ó°®ºÃÕßµÄÖ§³ÖÏ£¬Äں˰汾²»¶Ï¸üС£ÐµÄÄÚºËÐÞ¶©Á˾ÉÄں˵Äbug£¬²¢Ôö¼ÓÁËÐí
http://www.phpv.net/article.php/40
ÈçºÎ±àÒëLinuxÄÚºË- Linuxer ......

linuxÏÂʹÓÃTCP´æ»î(keepalive)¶¨Ê±Æ÷

2008-05-22 14:34
/*ÓÉ
hi.baidu.com/zhihui3409
ÊÕ¼¯ÕûÀí£¬×ªÔØʱÇ븽´ø
´ËÐÐ*/
Ò»¡¢Ê²Ã´ÊÇkeepalive¶¨Ê±Æ÷£¿[
1]
ÔÚÒ»
¸ö¿ÕÏеģ¨
idle
£©
TCP
Á¬½ÓÉÏ£¬Ã»ÓÐÈÎ
ºÎµÄÊý¾ÝÁ÷£¬Ðí¶à
TCP/IP
µÄ³õѧÕ߶¼¶Ô´Ë¸Ðµ½¾ªÆæ¡£Ò²¾ÍÊÇ˵£¬Èç¹û
TCP
Á¬
½ÓÁ½¶ËûÓÐÈκÎÒ»¸ö½ø³ÌÔÚÏò¶Ô·½·¢ËÍÊý¾Ý£¬ÄÇôÔÚÕâÁ½¸ö
TCP
Ä ......

ARM Linux Boot Sequence

contact me go -> xuqiang.docs@hotmail.com
ARM Linux Boot Sequence
The following traces the Linux boot sequence for ARM-based systems in the 2.6.18 kernel. It looks at just the earliest stages of the boot process, until the generic non-processor-specific start_kernel function is called. The line ......

LinuxÏÂDDDµÄ°²×°

Õâ¸öDDD°²×°ÁËÒ»ÍíÉÏ£¬¼Ç¼²½ÖèÈçÏ£º
1.ÏÂÔØlesstif-0.93.40.tar.bz2£¨ddd-3.3.11.tar.gz µÄÎĵµÖÐ˵Õâ¸öÎȶ¨ÎÒ¾ÍÓÃÕâ¸öÁË£©´Óhttp://www.ibiblio.org/pub/X11/lesstif/srcdist/·Åµ½/usr/localÏ£¬È»ºóÊÇÈý²¿Çú£º./configure ,make,make install
2.ÏÂÔØddd-3.3.11.tar.gz ´Óhttp://download.chinaunix.net/download/0003 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ