[lug] finding text lines in a single file

Kenneth D. Weinert mc at quarter-flash.com
Tue Apr 27 13:21:57 MDT 2004


On Tue, 27 Apr 2004 13:07:03 -0600
Jeff Schroeder <jeff at neobox.net> wrote:

> for line in `cat EntryFile`; do
>   echo "Searching for $line"
>   grep $line LogFile
> done

Minor change:

while read line;do
  echo "searching for $line"
  grep "$line" LogFile
done < EntryFile

-- 
Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20040427/a34e9616/attachment.pgp>


More information about the LUG mailing list