home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 22114 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.3 KB

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