Path: utzoo!attcan!uunet!cs.utexas.edu!romp!auschs!awdprime!doorstop.austin.ibm.com!tif From: tif@doorstop.austin.ibm.com (Paul Chamberlain) Newsgroups: comp.unix.shell Subject: Re: Sounds trivial, but it's not (I don't think) Message-ID: <3709@awdprime.UUCP> Date: 1 Oct 90 16:51:56 GMT References: <1990Sep28.175140.17023@bkj386.uucp> Sender: news@awdprime.UUCP Reply-To: tif@doorstop.austin.ibm.com (Paul Chamberlain) Organization: IBM AWD, Austin, TX Lines: 48 Summary: Expires: Sender: Followup-To: Keywords: On 27 Sep 90 21:04:58 GMT, Sean Fulton 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@doorstop, sc30661@ausvm6 512/838-7008 | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif