home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.vms:22114 vmsnet.tpu:615
- Newsgroups: comp.os.vms,vmsnet.tpu
- Path: sparky!uunet!stanford.edu!agate!ames!elroy.jpl.nasa.gov!usc!howland.reston.ans.net!paladin.american.edu!gatech!concert!seq!hawks
- From: hawks@seq.uncwil.edu (David Hawks)
- Subject: HELP!! String search and replace
- Message-ID: <1993Jan27.022647.21209@seq.uncwil.edu>
- Summary: string search and replace
- Keywords: strings, search, replace, editors, source
- Organization: Univ. of North Carolina @ Wilmington
- Date: Wed, 27 Jan 1993 02:26:47 GMT
- Lines: 35
-
- Hi everyone,
- I am on a VMS machine running at least VMS version 5.5. My question
- is I would like to know if there is a utility already out there on the
- net that will search and replace a string in multiple files? Something
- like, strrpl <files> <string1> <string2>. Any help here would be much
- appreciated.
- The previous question actually arises from my need to replace a
- string in multiple files and also append a comment to the end of the line
- where the replacement occurred. I am not sure a utility such as the one
- mentioned previously would help me but the utility would be very handy for
- some other tasks. I would welcome any help in either case.
- To be clearer, what my problem involves is the removal of all
- references to logicals from several hundred perhaps thousands of files.
- To maintain certain standards of code maintenance each change in the code
- has to commented. This includes removing logicals. So each time I remove a
- logical it will have to be commented on the same line with a reference to
- a revision number.
- I have attempted to create an lse command procedure to do the trick
- but just haven't managed to get it quite right. If someone could
- perhaps e-mail me a possible solution I would be very grateful. I could
- use any solution that would work at the DCL level or with any of the editors
- edt, tpu or lse. BTW I can actually and did replace strings in multiple
- files using an edt command procedure but appending a comment on each line
- as I remove a logical or string has me stumped.
-
- If you can help me, please e-mail me at.....
- hawks@seq.uncwil.edu
-
- Thanks for any help,
- Dave (hawks@seq.uncwil.edu)
-
- ps.
- Even though I know how to replace strings in multiple files using
- command files executed by the editor it would be nice to have one that
- was more general and run at the DCL level.
-