RCP程序UUCP 执行出错

设置了环境变量

UUCP_ST_FROM=$MS_COMM/snd
UUCP_ST_TO=$MS_COMM/rcv
UUCP_HO_FROM=sh_headof:/home2/headof/snd/str$STORE_NO
UUCP_HO_TO=sh_headof:/home2/headof/rcv/str$STORE_NO

用下面的程序脚本

if [ $# ! = 2 ]
then
echo Usage: $ 0 < 'send ' | 'recv ' > < file >
exit 1
fi

if [ $ 1 ! = send-a $ 1 ! = recv]
then
echo Usage: $ 0 < 'send ' | 'recv ' > < file >
exit 2
fi

WHAT
=$ 1
FILE
=$ 2

# if sendwaittillfileisreadable ( exists )
if [ $ WHAT = send]
then
while[!-r
$ UUCP_ST_FROM /$ FILE]
do
SLEEP
121 $ FILE
done
fi

TEMP1
=/ tmp /$$. 1
TEMP2
=/ tmp /$$. 2

AGAIN
= yes
while[
$ AGAIN = yes]
do
if [ $ WHAT = send]
then
rcp
$ UUCP_ST_FROM /$ FILE $ UUCP_HO_TO /$ FILE > $ TEMP1 2 > $ TEMP2
RET
=$ ?
else
rcp
$ UUCP_HO_FROM /$ FILE $ UUCP_ST_TO /$ FILE > $ TEMP1 2 > $ TEMP2
RET
=$ ?
fi
# Wehaveasmallproblemhere . RET == 0 does not alwaysmeanthat
# communicationdidsucceed . Only if thestdoutandstderrstream
# ( file $ TEMP1and $ TEMP2 ) areemptythecommunicationwas
# succesful .
# ( RET == 0 andanerrorhappensatleast if theerrormessageis
# 'connectionrefused' .)
if [ $ RET! = 0 -o-s $ TEMP1-o-s $ TEMP2]
then
# error , waitandtryagain
SLEEP
151 $ FILE
else
AGAIN
= no
fi
rm-f
$ TEMP1 $ TEMP2
done

# Nowcreateentryinyrnamefileandsendthatfiletohead-office .
LOGFILE
= yrname $ JULIAN
if [ $ WHAT = send]
then
LOGDIRFILE
=$ UUCP_ST_FROM /$ LOGFILE
TODIRFILE
=$ UUCP_HO_TO /$ LOGFILE
else
LOGDIRFILE
=$ UUCP_ST_TO /$ LOGFILE
TODIRFILE
=$ UUCP_HO_FROM /$ LOGFILE
fi
# logisusedbecauseitusesfilelockingsothatonlyoneprocess
# writestothatfileatacertainmoment
log
$ LOGDIRFILE $ FILE

# sendfiletohead-office
rcp
$ LOGDIRFILE $ TODIRFILE`
# Don'tcheck for succesfultransmission , yrnameis not tooimportant
# inhead-office . Secondly , theyrnamefileisgrowingsoa
# successive call tost_uurcpcansendthefile .

exit 0

执行完报错

st_uucp recv mmlcom$JULIAN &

Start date End date Ret Program
Tue Jun 26 03:24:04 CDT 2007 Tue Jun 26 03:24:06 CDT 2007 0 sqlplus (store_dpgl)
Tue Jun 26 03:24:06 CDT 2007 Tue Jun 26 03:24:11 CDT 2007 0 sqlplus (ins_xjy_cust)
Tue Jun 26 03:24:11 CDT 2007 Tue Jun 26 03:24:11 CDT 2007 0 sqlplus (visit)
Tue Jun 26 03:24:11 CDT 2007 Tue Jun 26 03:24:12 CDT 2007 0 sqlplus (get_all_art)
Tue Jun 26 03:24:16 CDT 2007 Tue Jun 26 03:24:16 CDT 2007 3 st_uucp (mmlcom07176)
Tue Jun 26 03:24:20 CDT 2007 Tue Jun 26 03:24:20 CDT 2007 3 st_uucp (supcom07176)
Tue Jun 26 03:24:24 CDT 2007 Tue Jun 26 03:24:25 CDT 2007 3 st_uucp (artcom07176)
Tue Jun 26 03:24:28 CDT 2007 Tue Jun 26 03:24:28 CDT 2007 3 st_uucp (mmacom07176)
Tue Jun 26 03:24:32 CDT 2007 Tue Jun 26 03:24:32 CDT 2007 3 st_uucp (rorcom07176)
Tue Jun 26 03:24:36 CDT 2007 Tue Jun 26 03:24:37 CDT 2007 3 st_uucp (dorcom07176)
Tue Jun 26 03:24:40 CDT 2007 Tue Jun 26 03:24:40 CDT 2007 3 st_uucp (ewacom07176)
Tue Jun 26 03:24:44 CDT 2007 Tue Jun 26 03:24:45 CDT 2007 3 st_uucp (teccom07176)
Tue Jun 26 03:24:48 CDT 2007 Tue Jun 26 03:24:48 CDT 2007 3 st_uucp (barcom07176)
Tue Jun 26 03:24:52 CDT 2007 Tue Jun 26 03:24:52 CDT 2007 3 st_uucp (mutcom07176)
Tue Jun 26 03:24:56 CDT 2007 Tue Jun 26 03:24:57 CDT 2007 3 st_uucp (darcom07176)
Tue Jun 26 03:25:00 CDT 2007 Tue Jun 26 03:25:00 CDT 2007 3 st_uucp (ccccom07176)
Tue Jun 26 03:25:04 CDT 2007 Tue Jun 26 03:25:05 CDT 2007 3 st_uucp (cbhcom07176)
Tue Jun 26 03:25:08 CDT 2007 Tue Jun 26 03:25:08 CDT 2007 3 st_uucp (depcom07176)
Tue Jun 26 03:25:12 CDT 2007 Tue Jun 26 03:25:12 CDT 2007 3 st_uucp (unbcom07176)

你可能感兴趣的:(脚本,F#,Office)