[ale] need a simple shell script
Armsby John-G16665
John.Armsby at motorola.com
Mon Mar 14 17:18:19 EST 2005
OK, I think this does it....
find ExternalDocuments_dir -name *.html | xargs grep -i '04' | grep -i verified
-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Armsby John-G16665
Sent: Monday, March 14, 2005 4:52 PM
To: 'Atlanta Linux Enthusiasts'
Subject: [ale] need a simple shell script
Guys,
I am embarassed to admit my ignorance but a need a shell script to do the following.
1. find *.html files (recurse) in a particular folder. pipe it to:
2. grep -i 'verified' pipe it to:
3. grep 04
4. Print the path and filename of the file which meets criteria 1,2,3.
i have bits of it but a unable to string the pieces together:
this script find files recursively and prints filename | time stamp info to a file:
find vault_dir -type f -follow -exec ls -l {} \; | awk '{printf"%s|%s %s %s\n",$9, $6, $7, $8}' > /home/dc/Log_dir
/vault.log
This script recursively find files with '04' in them.....
find ExternalDocuments_dir -name *.html -exec grep -i 04 {} \;
I have looked around but have not found the glue to put all this stuff together...
John
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ale
mailing list