Sounds trivial, but it's not (I don't think)
Paul Chamberlain
tif at doorstop.austin.ibm.com
Tue Oct 2 02:51:56 AEST 1990
On 27 Sep 90 21:04:58 GMT, Sean Fulton <sean at utoday.uucp> wrote:
> [..snipped..]
> 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`
> [..snipped..]
This may be functionally equivalent to an earlier response but it
was not clear from that response.
I didn't see the original posting but I will assume (since it's harder),
that you want to sleep between each file. Hopefully, it's obvious what
to do if this isn't the case.
You could do one of the following:
for a in `ls files`
do
echo sleep 10
echo cat $a
echo sleep 10
done > /tmp/cu.cmd
cu system <<\!
~$sh /tmp/cu.cmd
!
rm /tmp/cu.cmd
or this might even work:
for a in `ls files`
do
sleep 10
cat $a
sleep 10
done | cu system
These weren't tested. I think the '\!' is required to keep the $sh from
being expanded by the shell. Extra credit for making the temp filename
a variable.
Paul Chamberlain | I do NOT represent IBM tif at doorstop, sc30661 at ausvm6
512/838-7008 | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif
More information about the Comp.unix.shell
mailing list