AppleDragonhapp.blog.chinaunix.net
AppleDragon
全部博文(89)
2012年(1)
2011年(5)
2010年(14)
2009年(69)
2909157
wangxinm
格伯纳
我是小小
alpha68
cyhtianc
Junyius
马背水手
sometime
青泥橘子
mymmsc
分类:
2009-09-17 10:07:59
#/bin/csh #clean files rm -rf 1 1.tmp rm -rf IDS rm -rf IDS.new rm -rf ID #find IDS foreach file (./dlg/*.*) grep "IDS" $file >> 1.tmp #awk -F"(" '{print $2}' formatmessage | awk -F"," '{print $1}' >> 1.tmp end sed 's/ //g' 1.tmp | sed 's/{//g' | sed 's/}//g' >> IDS awk -F"IDS" '{print $2}' IDS >> IDS.new set i = 0 set l = `awk 'END{print NR}' IDS.new` # while ( $i <= $l ) set line=`awk "{ if (NR == $i) print}" IDS.new` echo $line | grep "," > /dev/null if ( $status == 0 ) then; echo "IDS"$line | awk -F"," '{print $1}' >> ID.tmp @ i++ continue endif echo $line | grep ")" > /dev/null if ( $status == 0 ) then; echo "IDS"$line | awk -F")" '{print $1}' >> ID.tmp @ i++ continue endif @ i++ end #delete repeat line sed -n 'G; s/\n/&&/; /^\([ -~]*\n\).*\n\1/d; s/\n//; h; P' ID.tmp >> ID rm -rf 1 1.tmp rm -rf IDS rm -rf IDS.new rm -rf ID.tmp
#!/bin/csh rm -rf ID.del ./1.sh ./2.sh set i = 0 set l = `awk 'END{print NR}' ID` # while ( $i <= $l ) set line=`awk "{ if (NR == $i) print}" ID` grep -w "$line" ID.now if ( $status == 0 ) then; #echo "IDS"$line | awk -F"," '{print $1}' >> ID.tmp @ i++ continue endif echo $line >> ID.del @ i++ end
上一篇:oracle 官方文档 关于 nls_lang
下一篇:Spring MVC
登录 注册