Path: utzoo!utgpu!watmath!clyde!att!chinet!les
From: les@chinet.chi.il.us (Leslie Mikesell)
Newsgroups: comp.unix.wizards
Subject: Re: Shell script help needed
Message-ID: <7024@chinet.chi.il.us>
Date: 28 Nov 88 23:03:52 GMT
References: <1872@loral.UUCP>
Reply-To: les@chinet.chi.il.us (Leslie Mikesell)
Organization: Chinet - Public Access Unix
Lines: 22

In article <1872@loral.UUCP> jlh@loral.UUCP (Physically Pffft) writes:
>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. 

>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.

A) Starting a new shell in each directory should not a problem, but

B) if the work just involves editing files and the directories are
   arranged such that a wild-card filename can be constructed for
   the affected files, that might be a nicer approach.  For example,
   if you are in the parent of the 9 directories you could:
   vi */xfile.c */yfile.c
   to edit all copies of xfile.c and yfile.c. A nice thing about this
   method is that you can yank and put text between files and the
   search and "." (repeat last change) commands can be used through all
   the files.

Les Mikesell