Thread View: comp.unix.shell
3 messages
3 total messages
Started by Marek Pawlowski
Fri, 28 Sep 1990 17:51
Re: Sounds trivial, but it's not (I don't think)
Author: Marek Pawlowski
Date: Fri, 28 Sep 1990 17:51
Date: Fri, 28 Sep 1990 17:51
33 lines
1516 bytes
1516 bytes
On 27 Sep 90 21:04:58 GMT, Sean Fulton <sean@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..]
Simple, if I understood your question correctly. Essentially, this relies on
doing the following:
cd /directory/containing/the/files/to/be/sent/out
for a in *
do
foo
[...]
bar
done
Rather simple.
So, when do I get my free subscription to Unix Today? :)
Marek Pawlowski || Intelligent Twist Software || You like bang-paths?
marekp@contact.uucp || 250 Harding Blvd. ||
root@aunix.uucp || PO Box 32017 || uunet!contact!marekp
marekp@generic.uucp || Richmond Hill, Ontario ||
marekp@pnet91.uucp || L4C 9M7 CANADA || Don't we all?
marekp@torag.uucp ||____________________________||
marekp@bkj386.uucp || ||
Re: Sounds trivial, but it's not (I don't think)
Author: Sean Fulton
Date: Sun, 30 Sep 1990 05:18
Date: Sun, 30 Sep 1990 05:18
37 lines
1413 bytes
1413 bytes
In article <1990Sep28.175140.17023@bkj386.uucp> marekp@bkj386.UUCP (Marek Pawlowski) writes: > >Simple, if I understood your question correctly. Essentially, this relies on >doing the following: > >cd /directory/containing/the/files/to/be/sent/out >for a in * >do > foo > [...] > bar >done > >Rather simple. >So, when do I get my free subscription to Unix Today? :) Consider your subscription done. But ... you didn't answer my question. Assuming foo is cu [system]<$a, you've accomplished exactly what I have. The hard part is being able to pipe all those files into one cu. As an update, I tried cu [system] <sender where sender is: ~$send.sh ~. And send.sh is similar to what you described above (for a in ... cat $a). This seems to work, unless anyone has a better idea. -- Sean Fulton sean@utoday.com UNIX Today! (516) 562-5430 /* The opinions expressed above are not those of my employer */
Re: Sounds trivial, but it's not (I don't think)
Author: Paul Chamberlain
Date: Mon, 01 Oct 1990 16:51
Date: Mon, 01 Oct 1990 16:51
48 lines
1748 bytes
1748 bytes
On 27 Sep 90 21:04:58 GMT, Sean Fulton <sean@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@doorstop, sc30661@ausvm6 512/838-7008 | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads