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

linuxÏÂÅúÁ¿ÐÞ¸ÄxmlÎļþÄÚÈÝ

´ó¼ÒºÃ£º

ºÃ¾Ã²»ÉÏCSDNÁË£¬ÉÏÀ´¾ÍÎÊÎÊÌ⣬ʵÔÚ²»ºÃÒâ˼¡£µ«Ò²²»µÃ²»ÎÊ¡£
ÎÒµÄÎÊÌâÊÇ£º ÔÚlinuxÏÂÓжà¸öxmlÎļþ£¬ÀïÃæÓÐÏàͬµÄµÇ¼ÐÅÏ¢£¨È磺Á¬½ÓÊý¾Ý¿âIP Óû§ÃûµÈ£©£¬ÐÞ¸ÄÆðÀ´·Ç³£µÄ²»·½±ã¡£ÎÒÏ뽫ÄÇЩͨÓõÄÐÅÏ¢ÔÙдһ¸öiniÎļþ£¬È»ºóÓýű¾µ÷Óᣲ»ÖªÈçºÎʵÏÖ¡£Çë´ó¼ÒÖ¸¶¨Ï£º

¾ÙÀý £º
xmlÎļþÖÐ
<IP>0.0.0.0 </IP>

iniÎļþ
IP=1.1.1.1

ÏÖÔÚÒª¶ÁÈ¡iniÎļþÖÐ×ֶΣ¬À´ÐÞ¸Äxml×ֶΡ£


Çë´ó¼Ò˵ÏÂʹÓÃʲô½Å±¾£¬¾ßÌåÓõÄʲô£¬Ð»Ð»¡£

xml²»ÊÇÓÐÏֳɵĽâÎöÆ÷ô
Ò²ºÜ·½±ãµÄ


js½Å±¾½âÎöxml¾Í±È½ÏºÃ

TiXmlʹÓÃÏê½â
http://blog.csdn.net/appletreesujie/archive/2009/05/21/4207435.aspx

ºÜ¼òµ¥µÄ£¬Äã¶Áµ½iniÎļþÖеÄ"ip"µÈ×ֶκ󣬱£´æÔÚÒ»¸övectorÀȻºóÔÙͨ¹ýÉϱߵÄÍøÕ¾½éÉܵķ½·¨¶ÁÈ¡
xmlÀïµÄÊý¾Ý£¬°ÑvectorÀïµÄÊý¾ÝÌæ»»µô¾Í¿ÉÒÔÁË£¬¼´£º
get£¬È»ºóÔÙset¡£

¿ÉÒÔÓÃÕýÔò±í´ïʽÀ´×÷Ìæ»»

sed »ò awk

ûÓùý£¬3Â¥µÄ·½·¨ms¿ÉÒÔ³¢ÊÔÒ»ÏÂ

¶¥£¡


ÒýÓÃ
Perl code

[root@martin tmp]# cat iniIP=1.1.1.1
PORT=5000
[root@martin tmp]# cat xml <IP>1.1.1.1 </IP> <PORT>5000 </PORT>
[root@martin tmp]# cat t.sh../ini
sed-i"s/\( <IP>\).*\( <\/IP>\)/\1$IP\2/" xml
sed-i¡­


ѧϰÁË£¡

¾Ý˵sedºÍawk¶¼¿ÉÒÔºÜÈÝÒ×ʵÏÖ

Õâ


Ïà¹ØÎÊ´ð£º

ǶÈëʽLinuxËõ¼õÎÊÌâ

´ó¼ÒºÃ£¬±¾ÈËÄ¿Ç°¸Õ¸Õ½Ó´¥Linux¡£ÏÖÔÚ¹«Ë¾µÄÏîÄ¿ÐèÒªËõ¼õLinuxµÄKernelºÍAPP²¿·ÖµÄCode Size¡£Ä¿Ç°ÎÒÃÇʹÓõÄÊÇLinux2.6.22.15°æ±¾£¬Ó¦ÓÃÓÚADSL Modem£¨¼ÒÍ¥Íø¹Ø£©¡£

1.ÎÒÃDzúÆ·Ó¦ÓÃÊÇADSL Gateway£¬Kernel²¿ ......

linux 2.6 Äں˵ÄÅäÖÃÎļþÔÚÄÄÀï

Á½Ì¨»úÆ÷ÐͺÅÍêÈ«Ò»Ñù

ÏëÒª°Ñһ̨»úÆ÷µÄÄÚºËÅäÖÃÎļþ¿½±´¸øÁíÍâһ̨

RT


3Q
...

.config Òþ²ØµÄ ÔÚÄãÅäÖùýÄں˺ó¾ÍÉú³ÉÁË

lsÕý½â£¬ÔÚkernelÔ´Â붥²ãĿ¼ÖÐÓиö.configÎļþ£¬ÅäÖ ......

Linux Ŀ¼ÎÊÌâ

LinuxÐÂÊÖ£¬Çë´ó¸ç´ó½ã²»Òª¼ûЦ¡£

ÎÒÓÃrootÓû§µÇ¼µ½Linuxϵͳ¡£ÔÚ¸ùĿ¼ÏÂÃ潨ÁËĿ¼dir1£¬ºóÓÃÃüÁîcd /dir1½øÈëµ½dir1Ŀ¼Ï£¬È»ºóÔÙÓÃmkdir dir2½¨Á¢ÁËĿ¼dir2 £¬ÔÙºóÀ´ÓÃÃüÁîcd /dir2ÊÇ£¬ÌáʾΪ£º-bush ......

linux vsftp ¸ü¸ÄÉÏΰĿ¼

linux vsftpd Äܲ»Äܸü¸ÄĬÈϵÄFTPÉÏ´«Ä¿Â¼?
ʹÓÃftpµÇ¼£¬»áµÇ¼µ½/home/ftp Õâ¸öĿ¼£¬ÎÒÏë¸ü¸Äµ½ÆäËûµÄĿ¼£¬ÔõôÅäÖÃÄØ

Çë¸ßÊִͽÌß¹£¬¼±¼±¼±£¡
ÓÐЩftp¹¤¾ß¿ÉÒÔÖ±½Ó×Ô¼ºÐ´Ä¿Â¼µÄ°É£¬Õâ¸öĿ¼Ӧ¸Ã¾ÍÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ