Shell script help needed

Leslie Mikesell les at chinet.chi.il.us
Tue Nov 29 09:03:52 AEST 1988


In article <1872 at loral.UUCP> jlh at 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



More information about the Comp.unix.wizards mailing list