[ILUG] shell scripting help required
Stephen_Reilly at dell.com
Stephen_Reilly at dell.com
Wed Aug 1 11:28:20 IST 2001
> > On Wed, Aug 01, 2001 at 09:13:38AM +0100, hrishy wrote:
> > > i would like to have a count of all not found
> > > by components........
^^^^^^^^^^^^^
> grep "not found" file | wc -l
grep 'not found' *.txt | cut -f1 -d'|' | uniq -c
Although you might have to use sort before the uniq. This will give output
like:
3 st.txt:label
2 st1.txt:report
.
.
.
1 st34.txt:label
you can tidy that up more, but how and ever ...
steve
More information about the ILUG
mailing list