cisdownload
上传用户:duobangkj
上传日期:2007-01-07
资源大小:70k
文件大小:2k
- : << README
- This file uses 8-character tabstops.
- cisdownload @(#)Download CIS LIB file with XT JPRadley 25 Oct 95 vers 0.2
- Assumes System-wide preference for B+ set in GO PROFILE.
- Assumes Prompt character in all Fora is ^H.
- Could use more checks. Providing a non-existent Forum, or one which one
- has not joined; providing an incorrect or inaccessible LIB number;
- providing a non-existent filename: all of these will cause failure
- while the meter's ticking.
- But if "all systems are go", then this should save a few pennies.
- README
- echo "ntDownload a file from CompuServe using XT"
- echo "ntDefault answers are in brackets"
- echo "nWhat Forum [SCOForum] ? c"
- read GO
- FORUM=`echo ${GO:=scoforum} | tr '[A-Z]' '[a-z]'`
- echo -n "nWhat Library [1] ? c"
- read RARY
- LIB="LIB "${RARY:=1}
- until test "$THERE"
- do
- echo "nName (case-insensitive) of the file on CIS? c"
- read THERE
- done
- WHERE="[$THERE] "
- while :
- do
- echo -n "nPathname (case-sensitive) to use here $WHERE? "
- read AND
- HERE=${AND:-$THERE}
- if test -f "$HERE" || test -d "$HERE"
- then
- echo "n'$HERE' already exists. You may BREAK from this"
- echo "script and either remove or rename '$HERE',"
- echo "or choose another name instead.n"
- WHERE=''
- else
- break
- fi
- done
- S=/usr/tmp/Download$$ # not publicly readable, to protect CIS password
- trap 'rm $S' 0 2 3
- cat >$S <<sCrIpT
- set cis "on"
- call ".xtcis"
- assign SERVICE eq "$FORUM"
- call ".pass"
- waitfor "moment please..."
- tty "on"
- if ! waitfor "forum !^H" 60; then transmit "bye^M"; quit; endif
- transmit "$LIB^M"
- waitfor "$LIB !^H"
- set cis "on"
- transmit "DOW $THERE^M"
- transmit "$HERE^M"
- waitfor "$LIB !^H"
- set cis "off"
- transmit "off^M"
- quit
- sCrIpT
- xt -s$S