Path: utzoo!attcan!uunet!seismo!esosun!ucsdhub!loral!jlh From: jlh@loral.UUCP (Physically Pffft) Newsgroups: comp.unix.wizards Subject: Shell script help needed Keywords: Suspend a foreach() loop? Message-ID: <1872@loral.UUCP> Date: 21 Nov 88 17:19:42 GMT Organization: At the Remote Controls Lines: 24 Our application has it's source code in 9 directories, and I find that often I need to make similar changes in all 9 directories. Manually cd'ing into each directory is error prone, some are skipped and others are entered more than once. I'd like to write a shell script to automate this that would act as follows: 1. Enter all the directory names into a file (only need to do once) 2. Invoke the script, it reads the first directory from the file and cd's into it. It then suspends itself. 3. I do what I need to. 4. I enter 'next' or something to wake up the script, it reads the next directory from the file and cd's into it. Steps 2-4 are done for all directories. My problem is I don't know how to suspend a shell script like this, and then have it continue where it left off. My only idea is to create a new shell ('/bin/sh'), but I think this would be slower than snail snot. Anyone have any ideas? Thanks. Jim -- Jim Harkins jlh@loral.cts.com Loral Instrumentation, San Diego