home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
- From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
- Newsgroups: vmsnet.tpu
- Subject: Re: How to EDIT files via a COMMAND FIle
- Date: 21 Nov 1992 00:14:34 GMT
- Organization: HST Wide Field/Planetary Camera
- Lines: 37
- Distribution: world
- Message-ID: <1ejv1aINNeqa@gap.caltech.edu>
- References: <01GRDAR6Q8RM001XBD@utrcgw.utc.com>
- Reply-To: carl@SOL1.GPS.CALTECH.EDU
- NNTP-Posting-Host: sol1.gps.caltech.edu
-
- In article <01GRDAR6Q8RM001XBD@utrcgw.utc.com>, "frank (Chip) Dyer x9568 ..Electrical Design" writes:
- > EVE/TPU experts:
- >
- > I have about 50 files with the number "100C000" (hexadecimal) in them. I
- > need to edit all these files and replace "100C000" with "1010000." Is it
- > possible to do this through a non-interactive (automatic) process?
- >
- > Ideally I want to have a COMMAND procedure do a GLOBLAL REPLACE on
- > "100C000" - something like
- >
- > $ EDIT/TPU/NOINIT/NODISplay/COMmand=SYS$INPUT in.src/OUTput=OUT.SRC
- > EVE_REPLACE("100A","*!!*!!**")
- > $ EXIT
- >
- > Is this possible? I have never written or used any TPU procedures, so
- > any help you can provide will greatly be appreciated. I use EVE quite a
- > bit, but as far as writing or using TPU procedures, I have never done
- > that.
-
- $ EDIT/TPU/NODISPLAY/NOSECTION/COMMAND=SYS$INPUT: in.src/OUTPUT=out.src
- POSITION(CREATE_BUFFER('',GET_INFO(COMMAND_LINE,'FILE_NAME')));
- LOOP R := SEARCH("100C000", FORWARD);
- EXITIF R=0;
- POSITION(R);
- ERASE(R);
- COPY_TEXT("1010000");
- ENDLOOP;
- WRITE_FILE(CURRENT_BUFFER, GET_INFO(COMMAND_LINE,'OUTPUT_FILE'));
- EXIT;
- --------------------------------------------------------------------------------
- Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
-
- Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
- understanding of astronomy is purely at the amateur level (or below). So
- unless what I'm saying is directly related to VAX/VMS, don't hold me or my
- organization responsible for it. If it IS related to VAX/VMS, you can try to
- hold me responsible for it, but my organization had nothing to do with it.
-