Re: How do I make a script to change and recompile source code in Informix?
Posted in 1996
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Depends on what you mean by "simple change"; we had a script that would copy all .per and .4gl files from the "development" directory to the "production" directory, filtering them through sed to change the database name, e.g. cd $DEVEL for i in *.4gl *.per do sed "s/DATABASE develop/DATABASE production/g" $i > $PROD/$i done After that, the script would change to $PROD (source directory for production programs) and run Make on all the makefiles we generated from SYSPGM4GL using a 4gl program. I recommend 3 magnificent books from O'Reilly associates: sed & awk By Dale Dougherty Managing Projects with make By Andrew Oram & Steve Talbott Learning the Korn Shell By Bill Rosenblatt Best of Luck, Lawrence ---------------------------------------------------------------------- Lawrence Carrington Director Adjunto Hildebrando, S.A. de C.V. Sinaloa 107-303 Mexico DF, MEXICO "Don't be too proud of this technological terror you've constructed" --Darth Vader ---------------------------------------------------------------------- Kenneth Dybvik <Kenneth.Dybvik@idg.no> wrote: >I want to make a script that browses through directories, >delete .o and .frm files and then make a simple change to >all my global files. Recompiling should be done before moving to next >directory. > >Can anyone thell me if this is possible? If so, can you help me >getting started? > >I'm using Korn shell as shell. > >Thanks for all replays > >E-mail: Kenneth.Dybvik@idg.no