Thread View: comp.unix.shell
5 messages
5 total messages
Started by Sean Fulton
Thu, 27 Sep 1990 21:04
Sounds trivial, but it's not (I don't think)
Author: Sean Fulton
Date: Thu, 27 Sep 1990 21:04
Date: Thu, 27 Sep 1990 21:04
33 lines
1237 bytes
1237 bytes
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. ?? We're running on Xenix 2.3.3 if that makes a difference, using a TB+ over a 19200 serial line. -- 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: Leslie Mikesell
Date: Sat, 29 Sep 1990 02:41
Date: Sat, 29 Sep 1990 02:41
39 lines
1872 bytes
1872 bytes
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 <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@chinet.chi.il.us
Re: Sounds trivial, but it's not (I don't think)
Author: Sean Fulton
Date: Mon, 01 Oct 1990 12:01
Date: Mon, 01 Oct 1990 12:01
18 lines
1226 bytes
1226 bytes
In article <1990Sep29.024105.29939@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes: > >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). > Thanks for the suggestion. Unfortunately, the system on the other end is Atex, a dying mainframe publishing system whose installers seem to think it a priviledge for us to be able to dialup at all. The ~$command idea, however, works! Thanks again. -- Sean Fulton sean@utoday.com UNIX Today! (516) 562-5430 /* The opinions expressed above are not those of my employer */
Killing run away processes
Author: Jeremy J Starcher
Date: Tue, 02 Oct 1990 19:23
Date: Tue, 02 Oct 1990 19:23
17 lines
1333 bytes
1333 bytes
#!/bin/sh ######################################################################### # This shell script will zot (kill -9) all process except the user's # # shells. Several processes will return as none existent or some other # # error. Ignore those. # # # # This script file is dedicated to all those who find themselves with # # a program that quickly goes out of control and need a way to # # terminate it quickly. # # # # Caveat: This script must be named zot # # # # Author: Jeremy J Starcher (r3jjs@vax1.cc.uakron.edu) # # Date: 2 October 1990 # ######################################################################### kill -9 `ps -aux | grep $USER | grep -v -e -csh | grep -v 'sh zot' | cut -c10-15 | paste -s -`
Re: Killing run away processes
Author: Hans Mulder
Date: Tue, 09 Oct 1990 09:55
Date: Tue, 09 Oct 1990 09:55
33 lines
1842 bytes
1842 bytes
In article <708@VAX1.CC.UAKRON.EDU> r3jjs@VAX1.CC.UAKRON.EDU (Jeremy J Starcher) writes: >#!/bin/sh >######################################################################### ># This shell script will zot (kill -9) all process except the user's # ># shells. # Moreover, it will also kill all the user's shells, except maybe their login shell if it happens be named csh. It will also kill their window system if they use one, preferably leaving their terminal in an unusable state. ># Several processes will return as none existent or some other # ># error. Ignore those. # You don't like reliable software, do you? ># Caveat: This script must be named zot # Translation: "zot" is the Dutch word for "fool". ># Author: Jeremy J Starcher (r3jjs@vax1.cc.uakron.edu) # ># Date: 2 October 1990 # >######################################################################### > >kill -9 `ps -aux | grep $USER | grep -v -e -csh | grep -v 'sh zot' | cut -c10-15 | paste -s -` Ignore in particular any messages "sh: cut: not found" and "sh: paste: not found". Those merely indicate you live in BSD land and you knew that already. Have a nice day, Hans Mulder hansm@cs.kun.nl
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