<?xml version="1.0" encoding="GB2312"  ?>
<rss version="2.0">
<channel>
<title>ChinaUnix.net - Shell</title>
<link>http://bbs.chinaunix.net/forumdisplay.php?fid=24</link>
<description><![CDATA[³ýÁË×öÎªÃüÁîÖ±ÒëÆ÷Ö®Íâ, ËüÒ²ÊÇÒ»¸ö²»´íµÄ³ÌÐòÓïÑÔ, ÊÇÏµÍ³¹ÜÀíÎ¬»¤Ê±µÄÖØÒª¹¤¾ß]]></description><managingEditor>admin2@staff.chinaunix.net</managingEditor>
<webMaster>admin2@staff.chinaunix.net</webMaster>
<lastBuildDate>2009-07-04 16:15:00</lastBuildDate>
<item>
<title>¹ØÓÚsedµÄÐ¡ÎÊÌâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1498393</link>
<author>huxinstudy</author><pubDate>2009-07-04 15:59:58</pubDate><description><![CDATA[
×÷Õß: huxinstudy
·¢±íÓÚ: 2009-07-04 15:59:58 (GMT 8)
¼ò½é£ºÓÉÓÚ±¾ÈË³õÑ§sed,¶ÔÈç´úÂëÓÐÐ©²»½â, sed -nÊÇ·ñ±íÊ¾È¡ÏûÄ¬ÈÏÊä³ö¡£ÏÖÔÚ¶Ô'1,3p'Õâ¸ö²»Ì«Ã÷°×
cp $souce_file temp0005
            sed -n '1,3p' temp0005 >first_001
]]></description>
</item>
<item>
<title>xargsÓë$()»ò``ÓÐÊ²Ã´Çø±ð£¿ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1498388</link>
<author>wishel</author><pubDate>2009-07-04 15:54:09</pubDate><description><![CDATA[
×÷Õß: wishel
·¢±íÓÚ: 2009-07-04 15:54:09 (GMT 8)
¼ò½é£ºfind -name *.so|xargs ls -lºÍ
 ls -l `find -name *.so`»òls -l $(find -name *.so£©
ÓÐÊ²Ã´Çø±ð£¿
ÏµÍ³ÖÐalias ls='ls --color=auto'
½á¹ûxargs·½Ê½Ã»ÓÐÑÕÉ«£¬ºóÁ½ÕßÓÐ£¬ÎªÊ²Ã´£¿
]]></description>
</item>
<item>
<title>shell </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1498377</link>
<author>µ¶µ¶»¢</author><pubDate>2009-07-04 15:17:51</pubDate><description><![CDATA[
×÷Õß: µ¶µ¶»¢
·¢±íÓÚ: 2009-07-04 15:17:51 (GMT 8)
¼ò½é£ºÔÚ¼ÆËã»ú¿ÆÑ§ÖÐ£¬ShellË×³Æ¿Ç£¨ÓÃÀ´Çø±ðÓÚºË£©£¬ÊÇÖ¸¡°Ìá¹©Ê¹ÓÃÕßÊ¹ÓÃ½çÃæ¡±µÄÈí¼þ£¨ÃüÁî½âÎöÆ÷£©¡£ËüÀàËÆÓÚDOSÏÂµÄcommand.com¡£Ëü½ÓÊÕÓÃ»§ÃüÁî£¬È»ºóµ÷ÓÃÏàÓ¦µÄÓ¦ÓÃ³ÌÐò¡£Í¬Ê±ËüÓÖÊÇÒ»ÖÖ³ÌÐòÉè¼ÆÓïÑÔ¡£×÷ÎªÃüÁîÓïÑ
]]></description>
</item>
<item>
<title>Çó¾ÈÈçºÎÈÃshell¶ÔÔ¶³ÌÖ÷»ú½øÐÐ²Ù×÷£¡£¡ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1498333</link>
<author>568559256</author><pubDate>2009-07-04 13:53:33</pubDate><description><![CDATA[
×÷Õß: 568559256
·¢±íÓÚ: 2009-07-04 13:53:33 (GMT 8)
¼ò½é£º[size=6]ÎÒÊÇÏëÐ´Ò»¶Î´úÂë£¬¶ÔÔ¶³ÌlinuxÏµÍ³ÉÏµÄÎÄ¼þ½øÐÐ²Ù×÷Ñ½£¡£¡

ÓÃshe'llÐ´Ñ½£¡£¡

¸÷Î»¸ßÊÖ°ï°ïÃ¦Ñ½£¡£¡[/size]
]]></description>
</item>
<item>
<title>nawk -F? ÊÇºÎÒâË¼ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1498305</link>
<author>huxinstudy</author><pubDate>2009-07-04 12:03:40</pubDate><description><![CDATA[
×÷Õß: huxinstudy
·¢±íÓÚ: 2009-07-04 12:03:40 (GMT 8)
¼ò½é£ºnawk -F? '{if(NF>14) print NR,NF,FILENAME}' $report_path/$bsc/$c_year$c_month$c_date/$rep_type$c_hour.$c_extn >temp0008

ÇëÎÊÕâÐÐ´úÂëÖÐµÄ-F?±íÊ¾Ê²ÒâË¼
]]></description>
</item>
<item>
<title>awkÕýÔòÊ½ÖÐµÄ²»½â </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1498057</link>
<author>huxinstudy</author><pubDate>2009-07-03 20:24:05</pubDate><description><![CDATA[
×÷Õß: huxinstudy
·¢±íÓÚ: 2009-07-03 20:24:05 (GMT 8)
¼ò½é£º¼ÙÉèÓÐÒ»student.txtÎÄ¼þ,ÄÚÈÝÈçÏÂ,×Ö¶Î¼äÓÃtab·û¼ä¸ô(×¢:ÎÄ¼þÒ»¹²6ÐÐ) 
Ñ§ÉúÐÅÏ¢±í 
--------------------------------------------------- 
id name address   age 
01      zhangsan  ÉÏº£    10 
02      l
]]></description>
</item>
<item>
<title>»¹ÊÇsed ÕýÔòµÄÎÊÌâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1498041</link>
<author>lovegqin</author><pubDate>2009-07-03 19:47:08</pubDate><description><![CDATA[
×÷Õß: lovegqin
·¢±íÓÚ: 2009-07-03 19:47:08 (GMT 8)
¼ò½é£º[code]
[root@stest1 bin]# echo "123[abc]456[def]789[ghi]"|sed -nr 's/.*\[(.*)].*/\1/p'       
ghi
[root@stest1 bin]# echo "123[abc]456[def]789[ghi]"|sed -nr 's/.*\[(.*)].*\[(.*)]/\1/p'
def
[root@
]]></description>
</item>
<item>
<title>sedÁ¬ÐøÅÐ¶ÏµÄÇë½Ì </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497995</link>
<author>xiaobaibbb</author><pubDate>2009-07-03 17:45:51</pubDate><description><![CDATA[
×÷Õß: xiaobaibbb
·¢±íÓÚ: 2009-07-03 17:45:51 (GMT 8)
¼ò½é£ºroot@debian:~/test# cat 1 
aa
bb
ccc
ddd
root@debian:~/test# sed -e '/aa/i\ ' -e '/aa/a\ ' 1
 
aa
 
bb
ccc
ddd

sed ÓÐÃ»ÓÐ && ÀàËÆÕâÖÖÅÐ¶Ï£¿

/aa/a\ && /aa/i\
]]></description>
</item>
<item>
<title>É¾³ýÄ³¸öÄ¿Â¼ÏÂÃæ£¬ËùÓÐ¿ÕµÄÄ¿Â¼¡£ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497976</link>
<author>yy_galois</author><pubDate>2009-07-03 17:25:40</pubDate><description><![CDATA[
×÷Õß: yy_galois
·¢±íÓÚ: 2009-07-03 17:25:40 (GMT 8)
¼ò½é£ºÇó±È½Ï¼ò½àµÄ×ö·¨¡£


×¢Òâ£º¿ÕµÄÄ¿Â¼ÊÇÖ¸£¬Ã»ÓÐ°üº¬ÈÎºÎÕý¹æÎÄ¼þµÄÄ¿Â¼¡£
Ä¿Â¼ÏÂÃæ½ö½öÓÐ¶à¸ö¿ÕÄ¿Â¼£¬Ò²ËãÊÇ¿ÕÄ¿Â¼¡£
¸ùÄ¿Â¼ÏÂÃæÖ»ÓÐÕý¹æÎÄ¼þºÍÄ¿Â¼Á½ÖÖÎÄ¼þ¡£

[[i] ±¾Ìû×îºóÓÉ yy_galois ÓÚ 2009-7-3 17:26 
]]></description>
</item>
<item>
<title>Çë½ÌÒ»¶ÎshellµÄÒâË¼ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497946</link>
<author>alex_linux</author><pubDate>2009-07-03 16:57:21</pubDate><description><![CDATA[
×÷Õß: alex_linux
·¢±íÓÚ: 2009-07-03 16:57:21 (GMT 8)
¼ò½é£º[code]set_root_passwd() {
#default passwd(1)=abc
#root:v7ctDBA4H3SLY:6445::::::
#default passwd(2)=efg
echo "Setting default passwd ... "
ex -s $ROOTDIR/etc/shadow << _EOF_
1d
i
root:TIHBMj9vV
]]></description>
</item>
<item>
<title>Çë½ÌÒ»¸öÀ§È»ÁËºÜ¾ÃµÄÎÊÌâ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497874</link>
<author>270175100</author><pubDate>2009-07-03 16:01:30</pubDate><description><![CDATA[
×÷Õß: 270175100
·¢±íÓÚ: 2009-07-03 16:01:30 (GMT 8)
¼ò½é£º½Å±¾ÖÐ¿ÉÒÔÕâÑùÖ´ÐÐÃ´£¿

sh -x ./½Å±¾1   ./½Å±¾2   ²ÎÊý

½Å±¾1  µÄ×÷ÓÃÊÇÏÂÔØ ½Å±¾2£¬ÕâÑù¿ÉÒÔÊµÏÖÃ´£¿
ÄÇ¶ùÕâ¸ö²ÎÊý¶Ô½Å±¾1À´ËµÊÇ $2 ,²ÎÊý¶Ô½Å±¾2À´ËµÊÇ$1 ?
]]></description>
</item>
<item>
<title>sedÇóÖú </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497852</link>
<author>langaixue</author><pubDate>2009-07-03 15:46:41</pubDate><description><![CDATA[
×÷Õß: langaixue
·¢±íÓÚ: 2009-07-03 15:46:41 (GMT 8)
¼ò½é£ºÏëÔÚÎÄ¼þÖÐ²åÈëÎÄ±¾£¬ÓÉÓÚÎÄ±¾¹ý³¤£¬ÏëÏÈÔÚShellÖÐ¸³¸ø±äÁ¿£¬ÇëÎÊShellÖÐµÄ±äÁ¿ÔõÃ´²ÅÄÜ´«µ½sedÖÐÄØ£¿Ð»Ð»£¡
]]></description>
</item>
<item>
<title>awkÊ¹ÓÃÊý×é±¨´í£¿£¿ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497840</link>
<author>jack9981</author><pubDate>2009-07-03 15:39:59</pubDate><description><![CDATA[
×÷Õß: jack9981
·¢±íÓÚ: 2009-07-03 15:39:59 (GMT 8)
¼ò½é£ºawk -F'|' '{++a[$1]} END{for (i in a) print i,a}' aa.tmp
awk: cmd. line:1: (FILENAME=aa.tmp FNR=3) fatal: attempt to use array `a' in a scalar context

ÔõÃ´½â¾ö£¿ Ð»Ð»£¡£¡
]]></description>
</item>
<item>
<title>Ë­ÄÜ½âÊÍÒ»ÏÂÕâ¸öÅÅÐò£¿ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497824</link>
<author>ILoveMK</author><pubDate>2009-07-03 15:30:33</pubDate><description><![CDATA[
×÷Õß: ILoveMK
·¢±íÓÚ: 2009-07-03 15:30:33 (GMT 8)
¼ò½é£ºcat 1.txt

guge 50 3000
baidu 100 5000
google 110 5000
sohu 100 4500
baidu 100 6000


sort -n -k 2,3 1.txt

guge 50 3000
baidu 100 5000
baidu 100 6000
sohu 100 4500
google 110 5000


]]></description>
</item>
<item>
<title>ÔõÑùÈ¥³ýÎÄ¼þÖÐµÄÖØ¸´Êý¾Ý£¿£¿£¿ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497747</link>
<author>ssxy</author><pubDate>2009-07-03 14:13:58</pubDate><description><![CDATA[
×÷Õß: ssxy
·¢±íÓÚ: 2009-07-03 14:13:58 (GMT 8)
¼ò½é£º13311009872
13311133257
13301111000
13301363396
13301115228
13301160718
13321120224
13301363396

ÎÄ¼þÀïÊý¾Ý¸ñÊ½ÈçÉÏ¡£

1¡¢ÔõÃ´ÕÒ³öÖØ¸´µÄÊý¾Ý£¿
2¡¢ÔõÃ´Éú³ÉÒ»¸öÃ»ÓÐÖØ¸´Êý¾ÝµÄÎÄ¼þ£¨ÖØ¸´Êý¾ÝÖ»
]]></description>
</item>
<item>
<title>ÄÜ²»ÄÜ½âÊÍÒ»ÏÂÏÂÃæµÄÃüÁî </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497702</link>
<author>d_jacky</author><pubDate>2009-07-03 12:50:50</pubDate><description><![CDATA[
×÷Õß: d_jacky
·¢±íÓÚ: 2009-07-03 12:50:50 (GMT 8)
¼ò½é£ºfile1£º
dye
knit
bkk
file2£º
kabin:db:N
bkk:db:N
taipei:file:N
dye:file:N
knit:diskless:Y
dye:db:N
kabin:file:N
taipei:vpn:N
dye:vpn:Y
bkk:vpn:N
knit:file:Y
kabin:vpn:N
knit:vpn:N
fi
]]></description>
</item>
<item>
<title>ifÖÐÊ¹ÓÃÕýÔò±í´ïÊ½µÄ¸ñÊ½ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497693</link>
<author>cao_zidane</author><pubDate>2009-07-03 12:21:06</pubDate><description><![CDATA[
×÷Õß: cao_zidane
·¢±íÓÚ: 2009-07-03 12:21:06 (GMT 8)
¼ò½é£º´òËãÔÚshellÖÐ¼ÓÈëÒ»¶ÎifÅÐ¶ÏÓï¾ä£¬ÒªÅÐ¶ÏÎÄ¼þÃûÂú×ãÄ³¸öÌØÕ÷£¬Ê¹ÓÃÕýÔò±í´ïÊ½£º
±ÈÈç£¬ÔÚ³ÌÐòÖÐµÄÄ³¸ö²¿·Ö£¬¾ÙÀýÀ´ËµÄ³¸öÎÄ¼þÃûÎª$file = '55start999.s'Õâ¸öÎÄ¼þ£¬
ÏÖÔÚÒªÅÐ¶ÏÕâ¸öÎÄ¼þÃûÖÐÊÇ·ñº¬ÓÐstart£¬Èç¹ûÓÐ
]]></description>
</item>
<item>
<title>Çë½ÌÓÃawk¶ÔÍ¬Ò»ÎÄ¼þ·ÖÀàÍ³¼Æ×î´óÖµ¼°Æ½¾ùÖµ </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497621</link>
<author>hapig</author><pubDate>2009-07-03 11:40:35</pubDate><description><![CDATA[
×÷Õß: hapig
·¢±íÓÚ: 2009-07-03 11:40:35 (GMT 8)
¼ò½é£ºÓÐÒ»ÎÄ¼þÄÚÈÝÈçÏÂ£º
2009-4-2 15:00	291	239
2009-4-2 15:15	163	177
2009-4-2 15:30	240	269
2009-4-2 15:45	234	252
2009-4-3 15:15	159	157
2009-4-3 15:30	203	201
2009-4-3 15:45	329	357
2009-4-3 16:
]]></description>
</item>
<item>
<title>ÎÄµµ¹ýÂËÊä³ö </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497588</link>
<author>conniewu</author><pubDate>2009-07-03 11:19:10</pubDate><description><![CDATA[
×÷Õß: conniewu
·¢±íÓÚ: 2009-07-03 11:19:10 (GMT 8)
¼ò½é£ºÏò¸÷Î»Çë½Ì£º

     Èç¹ûÎÒÏÖÔÚÓÐÒ»´ó¶ÑÎÄµµ£¬Èç·Ö±ðÎª01.txt 02.txt 03.txt 04.txt¡­¡­£¬ÇÒÃ¿¸öÎÄµµÖÐ¶¼ÓÐÒ»¶ÑÐÅÏ¢£¬ÎÄµµ¼äÓÐÏàÍ¬µÄ¹Ø¼ü×Ö¡£ÎÒÏë´ÓÕâÐ©ÎÄµµÖÐ¹ýÂË³öÎÒÏëÒªµÄÐÅÏ¢£¬²¢Êä³öµ½Ò»¸öÐÂÎÄµµnew.outÖÐ£¬½
]]></description>
</item>
<item>
<title>Çë½ÌÕâ¸öshellµÄÐ´·¨£¬Í³¼ÆÐÐÊý </title>
<link>http://bbs.chinaunix.net/viewthread.php?tid=1497342</link>
<author>yyh</author><pubDate>2009-07-03 09:54:11</pubDate><description><![CDATA[
×÷Õß: yyh
·¢±íÓÚ: 2009-07-03 09:54:11 (GMT 8)
¼ò½é£ºÎÒµÄÈÕÖ¾¸ñÊ½Îª£º
09:55:54: ERROR1 /tmp/error/log.3 50 times
09:56:09: ERROR1 /tmp/error/log.14 50 times
10:56:12: ERROR1 /tmp/error/log.14 100 times
10:56:23: ERROR2 /tmp/error/log.5 50 times
11:
]]></description>
</item>
</channel>
</rss>