Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!rutgers!mcdchg!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.shell Subject: Re: Sounds trivial, but it's not (I don't think) Message-ID: <1990Sep29.024105.29939@chinet.chi.il.us> Date: 29 Sep 90 02:41:05 GMT References: <1815@utoday.UUCP> Organization: Chinet - Chicago Public Access UNIX Lines: 39 In article <1815@utoday.UUCP> sean@utoday.UUCP (Sean Fulton) writes: >We use a shell script and UUCP to do an automated ascii upload to a >publishing system that is pretty void of any knowledge of >communications with the outside world. >At any rate, we have a /bin/sh script that basically does: > cu sysname Where FILE is of the form: > >~!/bin/slp10 #wait 10 seconds >piles of data to be uploaded >~!/bin/slp10 #wait another 10 seconds >~. #Hangup the telephone. >This has been somewhat reliable, but only allows for one file >per call. Given that there is a modem shortage on the remote end, this >is unacceptable. >So, does anyone have any ideas on how to do something like: > >~!for a in `ls files` >... etc. Sure - you can just use ~$command in your input to cu and "command" will be executed with its output directed to the outbound line. I'd suggest a script that simply cat's the files from a directory one by one and then mv's them elsewhere. That gives you a chance to pick up where you left off if the connection is broken. However... You can get a version of kermit for almost everything these days although it is sometimes difficult to convince the administrator on the other end that it is worth the trouble to locate and install it. Having kermit at both ends makes this sort of thing trivial (as long as at least one end handles scripts). Les Mikesell les@chinet.chi.il.us