LoveUnix » 编程开发 & Rational » 高手们,帮我解释一下!超级感谢!!
让LU留住您的每

一天 让LU博客留住您的每一天
2005-8-3 13:00 afantict
DWNLDIR=&quot;$HOME/cgi-bin&quot;<br /><br />TARGET=&quot;pdcp7250.pl&quot;<br /><br />cd $DWNLDIR<br />run=&quot;`ps -ef | grep $TARGET | grep -v grep | awk &#39;{print $2}&#39;`&quot;<br /><br />if [[ $run = &quot;&quot; ]] then<br />        ./$TARGET &amp;<br />fi<br /><br />高手们,帮我解释一下!超级感谢!!<br />

2005-8-3 14:03 larryh
如果pdcp7250.pl没有运行,就运行它

2005-8-4 12:59 afantict
高手,能拆分开给我讲讲吗?<br />我怎么都看不懂。

2005-9-24 08:19 irror
[code]
DWNLDIR="$HOME/cgi-bin"                             # 用DWNLDIR代表$HOME/cgi-bin这个目录  

TARGET="pdcp7250.pl"                                   # 用TARGET代表pdcp7250.pl  perl脚本  

cd $DWNLDIR                                                  # 切换到$HOME/cgi-bin目录  
run="`ps -ef | grep $TARGET | grep -v grep | awk '{print $2}'`"  # 列出pdcp7250进程号  

if [[ $run = "" ]] then                                       # 判断:pcdcp7250进程号如果不存在  
./$TARGET &                                                   #  执行pdcp7250.pl perl脚本
fi                                                                     #  条件结束
[/code]
:)

[[i] 本帖最后由 irror 于 2005-9-24 08:25 编辑 [/i]]

2005-9-28 13:26 hgjer
up

2005-9-28 13:27 hgjer
up

2005-9-28 13:27 hgjer
up

2005-9-28 13:27 hgjer
up

2005-9-28 13:28 hgjer
up

2005-9-28 13:28 hgjer
up

2005-9-28 13:29 hgjer
up

2005-9-28 13:29 hgjer
up

2005-9-28 13:29 hgjer
up

2005-9-28 13:30 hgjer
up

2005-9-28 13:33 hgjer
up

2005-9-28 13:33 hgjer
up

2005-9-28 13:34 hgjer
up

2005-9-28 13:34 hgjer
up

2005-9-28 13:34 hgjer
up

2005-9-28 13:35 hgjer
up

2005-9-28 13:35 hgjer
up

2005-9-28 13:35 hgjer
up

2005-9-28 13:36 hgjer
up

2005-9-28 13:36 hgjer
up

页: [1] 2 3 4


Powered by Discuz! Archiver 5.5.0  © 2001-2006 Comsenz Inc.