Sounds trivial, but it's not (I don't think)

Leslie Mikesell les at chinet.chi.il.us
Sat Sep 29 12:41:05 AEST 1990


In article <1815 at utoday.UUCP> sean at 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 <FILE
>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 at chinet.chi.il.us



More information about the Comp.unix.shell mailing list