home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / vmsnet / tpu / 620 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  4.3 KB

  1. Path: sparky!uunet!stanford.edu!bu.edu!inmet!noc.near.net!hri.com!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!mccall!info-tpu-newsgate!list
  2. From: engel4.engelin@ibmx400-se.ibmmail.circe.fr
  3. Newsgroups: vmsnet.tpu
  4. Subject: RE: HELP!! String search and replace
  5. Message-ID: <0576*ENGEL4.ENGELIN@IBMX400-SE.IBMMAIL.CIRCE.FR>
  6. Date: 27 Jan 93 09:49:00 GMT
  7. Reply-To: ENGEL4.ENGELIN@IBMX400-SE.IBMMAIL.CIRCE.FR
  8. Organization: The Internet
  9. Lines: 82
  10. Return-Path: <TPU-Mgr@SHSU.edu>
  11. Errors-To: TPU-Mgr@SHSU.edu
  12. X-Listname: Text Processing Utility (TPU) Language Discussion List
  13. P1-Message-Id: GB*IBMX400*IBMMAIL;Azr9aBzo+19930127094938170576
  14. Priority: normal
  15. X400-Trace: GB*IBMX400*IBMMAIL; arrival Wed, 27 Jan 93 09:49+0000 action
  16. X400-Trace: GB*IBMX400*; arrival Wed, 27 Jan 93 08:48+0000 action Relayed
  17. X400-Trace: FR*IBMX400*EARN; arrival Wed, 27 Jan 93 09:47+0100 action Relayed
  18.  
  19. RE: HELP!! String search and replace
  20. ----------------------------------------------------------------------
  21. >
  22.                   >Hi everyone,
  23.                   >
  24.                   >I am on a VMS machine running at least VMS version 5.5.  My
  25.                   >question is I would like to know if there is a utility
  26.                   >already out  there on the net that will search and replace a
  27.                   >string in multiple files?  Something like, strrpl <files>
  28.                   ><string1> <string2>.  Any help here  would be much
  29.                   >appreciated.
  30.                   >
  31.                   >The previous question actually arises from my need to
  32.                   >replace a string in multiple files and also append a comment
  33.                   >to the  end of the line where the replacement occurred.  I
  34.                   >am not sure a utility  such as the one mentioned previously
  35.                   >would help me but the utility would be  very handy for some
  36.                   >other tasks.   I would welcome any help in either case.
  37.                   >
  38.                   >[Further (clear) problem description removed]
  39.  
  40.                   The tool I use for this very purpose came off a DECUS
  41.                   symposium tape a few years ago. It is called MODIFY, and was
  42.                   written by
  43.  
  44.                                          T. G. Worlton
  45.                             Intense Pulsed Neutron Source Division
  46.                                   Argonne National Laboratory
  47.                                     Argonne, Illinois 60439
  48.  
  49.                   The version I have is   Version 2.0     28-JAN-1987
  50.  
  51.                   Upon closer inspection, I found it on the FALL 91 VAX/L&T
  52.                   SIG Tape, in directory [VAX91B.WORLTON]
  53.  
  54.                   MODIFY comes with pretty good documentation, although I have
  55.                   added some more. The HELP output is included below:
  56.  
  57.                   MODIFY
  58.  
  59.                        The MODIFY command is used to modify ASCII files. It
  60.                        may be used to replace a string of printable characters
  61.                        or control characters, detab a file, or convert a file
  62.                        to a fixed record length.
  63.  
  64.                        Format
  65.  
  66.                          MODIFY  file-spec[,...] srch_string rep_string
  67.  
  68.  
  69.  
  70.  
  71.                     Additional information available:
  72.  
  73.                     Parameters Description           Qualifiers
  74.                     /CONFIRM   /CONTROL   /DETAB     /EXACT     /FIXED
  75.                     /LENGTH    /LOG       /OUTPUT    /RANGE
  76.                     Examples
  77.  
  78.  
  79.                   I'm not sure, but I believe that Hunter Goatley has MODIFY
  80.                   on his FILESERVer, fileserv@wkuvx1.bitnet
  81.                   There might even be a newer version around ;-)
  82.  
  83.                   Anyway, MODIFY works fine for me. Highly recommended.
  84.  
  85.                   >
  86.                   >Thanks for any help,
  87.                   No problem, I just hope that this is enough.
  88.  
  89.                   >     Dave (hawks@seq.uncwil.edu)
  90.                   >
  91.                   --
  92.                   Claes Engelin    | Phone: +46 31 371943  |
  93.                   SKF Systems      | Fax:   +46 31 371716  |
  94.                   DSE/HK3-9        |
  95.                   S-415 50 G"OTEBORG|
  96.                   Sweden           |
  97.                   X.400: /S=ENGELIN/G=ENGEL4/ADMD=IBMX400
  98.                          /PRMD=IBMMAIL/C=SE
  99.                   Internet:
  100.                   engel4.engelin@ibmx400-se.ibmmail.circe.fr
  101.