我是大帅哥,擅长LINUX和C语言,还有脚本,希望和大家交朋友 mail:newhitler@163.com

《ShangHai Unicom》脚本

上一篇 / 下一篇  2007-07-22 10:39:05 / 个人分类:SHELL编程

LUPA开源社区*O7I*G iF

1)Install ftp_get.sh to the FTP server

e9v [2GrNcsG4_$~0

$z$]&LA4jR~0 LUPA开源社区 MXV$F-ord

G*x}HZ bO0###############################################LUPA开源社区 ?2]6]^LM {7ws%J
#!/bin/bashLUPA开源社区]LPH yb^0G
# ftp_get.sh
-c sy2cE0# 1)Move unicom cdr to solar
(GV EfR/pIH0`UR0# 2)Generation win batchLUPA开源社区 BS6O.[loA8[
# 3)Download unicom (CDMA) cdr
0I'o:C9O!MpAe@_~0# Written by Super MarioLUPA开源社区\$A4gTXU+D
###############################################
LUPA开源社区0W|q/s[:a#U

,OrLh.`g bdIZ0 

|8I3FTQ4{Q!w.nt B!FX]0

U4cn`P0x RM0LUPA开源社区dc4A;N-|is
###############################################LUPA开源社区#hi{i/ayd
# 1)Move unicom cdr to solar
s(m)pL$U;M?!k0###############################################LUPA开源社区HG+?ybL0lH}
mv /home/unicom/c1/* /ceno/product/solar/win_temp/new/c1
2@h |;M|0mv /home/unicom/g1/* /ceno/product/solar/storage/cdr/new/g1/
t^ \R-z6`'g*J0chown -R ares:ares /ceno/product/solar/storage/cdr/new/g1/LUPA开源社区 mM]["t$z
mv /home/unicom/g2/* /ceno/product/solar/storage/cdr/new/g2/LUPA开源社区Ymhpn,n;h7uN P
chown -R ares:ares /ceno/product/solar/storage/cdr/new/g2/

:o#m6h(Be6e%rE0 LUPA开源社区[u2l:g@ Y{z

 

FX1{ ^|4s lR l0 LUPA开源社区Q1H w[O!~QL?

LUPA开源社区;x H-]bA5V:U
###############################################
r t#c A [s q0# 2)Generation win batchLUPA开源社区^5d,N-C"u
###############################################
"S(WTD;b S%j0init_num1=1
YP T.B#Q5_'{0ls /ceno/product/solar/win_temp/new/c1/ -l|awk '{print $9}'|sed '1d'>list.txt
w&BlM9hOs0row_num1=`wc -l list.txt|awk '{print $1}'`
2dFj$UW g8s0row_num1=$(($row_num1+1))
LUPA开源社区k+e mdhq(]$GB

%f1`.|$F7Rj0echo 'cd \'>>/ceno/product/solar/win_temp/cdma1.batLUPA开源社区d\]0\Vo
echo 'd:'>>/ceno/product/solar/win_temp/cdma1.batLUPA开源社区^ Km8j ~7y*h8GMl
echo 'cd run'>>/ceno/product/solar/win_temp/cdma1.batLUPA开源社区!b#d;NTLD;jt!z$`
while [ "$init_num1" != "$row_num1" ]
z5fP \9Y3ni-B(~0        doLUPA开源社区N:I B ulQh0o
        destfile=`cat list.txt|sed -n "$init_num1"p`LUPA开源社区0l_qq:W.C;VQ3m0K1m
        sourcefile=`cat list.txt|sed -n "$init_num1"p|tr '.bak' '.txt'`LUPA开源社区4rc5m0h0d~
        command='decoder'LUPA开源社区o {uf S1g
        sourcefolder='D:\decoder\new\c1\'LUPA开源社区wY6x }9H
        destfolder='D:\decoder\handled\c1\'LUPA开源社区 {-Hw*^5S{(jP
        echo $command $sourcefolder$destfile $destfolder$sourcefile>>/ceno/product/solar/win_temp/cdma1.batLUPA开源社区`;s$h9K%pABe0EV P$Y
        init_num1=$(($init_num1+1))
h.a e nq:T.B0        done

X(nL:{+@|"i)u0

3a#_2tYrD)ca0 

6h u R.V RCn(S0 LUPA开源社区~+{'c*PaW6q9r


8l1eda6B?O0###############################################LUPA开源社区8]%? C8Mg/F$@W
# 3)Download unicom (CDMA) cdr
7{J0C_Nt0###############################################LUPA开源社区%j U#x9A1L?"p4}l
mv -vf /ceno/product/solar/win_temp/handled/c1/* /ceno/product/solar/storage/cdr/new/c1/*
$E$Fu}j k@0

*a ]x'I+C$f R]Gz)f0

6m*F8g u5Ucs i*Ooe:B0rm -f list.txtLUPA开源社区T Ws7r!v4jy

LUPA开源社区i9L_+r Bc!D

 LUPA开源社区*F:c*]vx f

~:Xncd A0 LUPA开源社区$T(n8]{`;j/{"U

LUPA开源社区9I;C*EbznVd

2)Install ftp_put_inc.sh to the WS01 server LUPA开源社区Jg|#[|Rd C?

Jh J O)]*Z0###############################################LUPA开源社区pv2G uhJ9I g
#!/bin/bash
6I8t}"j~+}0# ftp_put_inc.sh
7deI0] |7C0# Increase users uploading to the FTP serverLUPA开源社区4G.SVH&R(SBV
# Written by Super Mario
lt _6[jZ8b0###############################################
LUPA开源社区 DT2Y)Zl+wf`/K+F:X

LUPA开源社区qB$S;L0g$i^6Rs

cd /ceno/product/solar/storage/user_cache/incLUPA开源社区&^Q`#{ A}
tar cvzf incuser.tar.gz *LUPA开源社区$YZmh/{6B
scp incuser.tar.gz 192.20.1.250:/ceno/product/solar/storage/user_cache/inc/LUPA开源社区`Ak0O;c:l Z
rm -f *
u\'u"[*TJ2w R0rsh 192.20.1.250 'tar xvzf /ceno/product/solar/storage/user_cache/inc/incuser.tar.gz -C /ceno/product/solar/storage/user_cachLUPA开源社区 H e&C(dI[h
e/inc/'
$h e^(T}*JSS xVUpf0rsh 192.20.1.250 'rm -f /ceno/product/solar/storage/user_cache/inc/incuser.tar.gz'
6]wY fo&z&H R3HF0rsh 192.20.1.250 'chown ares:ares /ceno/product/solar/storage/user_cache/inc/*'
LUPA开源社区K,|yjVe's7w2Y


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-09-07  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 18931
  • 日志数: 60
  • 建立时间: 2007-07-22
  • 更新时间: 2008-07-30

RSS订阅

Open Toolbar