From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,b47e0aaeb3830892,start X-Google-Attributes: gidf7344,public X-Google-Thread: f7cd1,b47e0aaeb3830892,start X-Google-Attributes: gidf7cd1,public X-Google-Thread: 1164f8,b47e0aaeb3830892,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-02-26 11:28:25 PST Xref: gmd.de comp.os.vms:41042 comp.sys.dec:13625 vmsnet.misc:2090 Path: gmd.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) Newsgroups: comp.os.vms,comp.sys.dec,vmsnet.misc Subject: Re: Need VAX VMS DCL Script for non-interactive text file searching... Date: 26 Feb 1994 20:54:38 GMT Organization: HST Wide Field/Planetary Camera Distribution: world Message-ID: <2kocue$553@gap.cco.caltech.edu> References: <1994Feb26.133306.1@gsbacd.uchicago.edu> Reply-To: carl@SOL1.GPS.CALTECH.EDU NNTP-Posting-Host: sol1.gps.caltech.edu In article <1994Feb26.133306.1@gsbacd.uchicago.edu>, gft_robert@gsbacd.uchicago.edu (opcode ranger) writes: =Can anyone send me a VAX VMS DCL script which I can use to search =through a VAX text file for certain keywords and extract portions of =that text file around the keywords to another text file? What I'm =trying to do is to set up an automated system to read NEWS on a =non-interactive basis, extract all the unread articles to a text file =on a scratch disk, and search through the file for articles =containing certain keywords and extract those to another file, which =I can download at a later point when I logon on an interactive =basis. In particular I'm keen to extract the jobs.offered newsgroup =and search through for certain keywords, e.g. geographic locations. =The reason that it's not feasible to log-on and simply use the DCL ='search' command to interactivly peruse the file is that I have to =log on to this Chicago site via Ma Bell long distance from =Connecticut, and it's just prohibitively expensive to do it that way. $ READ/PROMPT="List keywords (comma-separated list): " SYS$COMMAND P1 $ READ/PROMPT="List window size (before,after):" SYS$COMMAND P2 $ READ/PROMPT="Input file: " SYS$COMMAND P3 $ READ/PROMPT="Output file: " SYS$COMMAND P4 $ SEARCH/OUTPUT='P4'/WINDOW=('P2') 'P3' 'P1' -------------------------------------------------------------------------------- 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.