M.V.Johnson wrote:
> ...
> Okay Bob,
>
> Her is the whole story. :-D
>
> I am processing a directory full of .txt files. These .txt files have
> the following structure:
>
> (DEVICE FILE: 74LVT16244A-TSSOP48_1)
> PACKAGE 'TSSOP-48-S0'
> CLASS IO
> PINCOUNT 48
> PINORDER 'LVT16244A-TSSOP48_1' A0
"M.V.Johnson" wrote:
>
> I am familiar with grep in the shell. Will that grep line work in the
> context of a perl script?
>
> The code is looking at a directory full of .txt files. I want to parse a
> line in the .txt file only if the file does NOT contain the line "CLASS IC"
Perhaps something
(top-posting fixed)
M.V.Johnson wrote:
> - Original Message -
> From: "Bob Showalter" <[EMAIL PROTECTED]>
> To: "'M.V.Johnson'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, September 12, 2003 1:25 PM
> Subject: RE:
t;Bob Showalter" <[EMAIL PROTECTED]>
To: "'M.V.Johnson'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, September 12, 2003 1:25 PM
Subject: RE: Searching files
> M.V.Johnson wrote:
> > What is the easiest way to search a text file for the
M.V.Johnson wrote:
> What is the easiest way to search a text file for the line "CLASS IC"
$ grep -q 'CLASS IC' mytextfile && echo 'Found it!'
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
What is the easiest way to search a text file for the line "CLASS IC"
Chris Zampese wrote:
> Hello everyone,
>
> I have a bunch of folders that I would like to search through for a
> particular string. Any hints on how to do this? I do not know the names
> of all the files, but would like to be able to return the name.
>
> Basically this is so I can search a b
Well on unix you could do this with a bit of find and grep, but if you are not on unix
or still want to do it the perlish way, you should check out the File::Find module,
then perldoc -f open and perldoc -f grep. Aka find the files, open each, store the
file to an array, run a grep on the array
on most *nix, you can use grep -rni
example: grep -rni '*.dat'
> -Original Message-
> From: Chris Zampese [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 4:08 PM
> To: [EMAIL PROTECTED]
> Subject: searching files
>
>
> Hello everyone
Hello everyone,
I have a bunch of folders that I would like to search through for a
particular string. Any hints on how to do this? I do not know the names of
all the files, but would like to be able to return the name.
Basically this is so I can search a bunch of files for a word, and be ab
10 matches
Mail list logo