🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.tpu
Article #147

RE: HELP!! String search and replace

#147
From: engel4.engelin
Date: Wed, 27 Jan 1993 09:49
82 lines
4534 bytes
RE: HELP!! String search and replace
----------------------------------------------------------------------
>
                  >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.
                  >
                  >[Further (clear) problem description removed]

                  The tool I use for this very purpose came off a DECUS
                  symposium tape a few years ago. It is called MODIFY, and was
                  written by

                                         T. G. Worlton
                            Intense Pulsed Neutron Source Division
                                  Argonne National Laboratory
                                    Argonne, Illinois 60439

                  The version I have is   Version 2.0     28-JAN-1987

                  Upon closer inspection, I found it on the FALL 91 VAX/L&T
                  SIG Tape, in directory [VAX91B.WORLTON]

                  MODIFY comes with pretty good documentation, although I have
                  added some more. The HELP output is included below:

                  MODIFY

                       The MODIFY command is used to modify ASCII files. It
                       may be used to replace a string of printable characters
                       or control characters, detab a file, or convert a file
                       to a fixed record length.

                       Format

                         MODIFY  file-spec[,...] srch_string rep_string




                    Additional information available:

                    Parameters Description           Qualifiers
                    /CONFIRM   /CONTROL   /DETAB     /EXACT     /FIXED
                    /LENGTH    /LOG       /OUTPUT    /RANGE
                    Examples


                  I'm not sure, but I believe that Hunter Goatley has MODIFY
                  on his FILESERVer, fileserv@wkuvx1.bitnet
                  There might even be a newer version around ;-)

                  Anyway, MODIFY works fine for me. Highly recommended.

                  >
                  >Thanks for any help,
                  No problem, I just hope that this is enough.

                  >     Dave (hawks@seq.uncwil.edu)
                  >
                  --
                  Claes Engelin    | Phone: +46 31 371943  |
                  SKF Systems      | Fax:   +46 31 371716  |
                  DSE/HK3-9        |
                  S-415 50 G"OTEBORG|
                  Sweden           |
                  X.400: /S=ENGELIN/G=ENGEL4/ADMD=IBMX400
                         /PRMD=IBMMAIL/C=SE
                  Internet:
                  engel4.engelin@ibmx400-se.ibmmail.circe.fr
Technical Details
Message-ID: <0576*ENGEL4.ENGELIN@IBMX400-SE.IBMMAIL.CIRCE.FR>
Path: arc1-ca.pugleaf.net!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

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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
From: engel4.engelin@ibmx400-se.ibmmail.circe.fr
Newsgroups: vmsnet.tpu
Subject: RE: HELP!! String search and replace
Message-ID: <0576*ENGEL4.ENGELIN@IBMX400-SE.IBMMAIL.CIRCE.FR>
Date: 27 Jan 93 09:49:00 GMT
Reply-To: ENGEL4.ENGELIN@IBMX400-SE.IBMMAIL.CIRCE.FR
Organization: The Internet
Lines: 82
Return-Path: <TPU-Mgr@SHSU.edu>
Errors-To: TPU-Mgr@SHSU.edu
X-Listname: Text Processing Utility (TPU) Language Discussion List
P1-Message-Id: GB*IBMX400*IBMMAIL;Azr9aBzo+19930127094938170576
Priority: normal
X400-Trace: GB*IBMX400*IBMMAIL; arrival Wed, 27 Jan 93 09:49+0000 action
X400-Trace: GB*IBMX400*; arrival Wed, 27 Jan 93 08:48+0000 action Relayed
X400-Trace: FR*IBMX400*EARN; arrival Wed, 27 Jan 93 09:47+0100 action Relayed