Script request

Jason Watson jw at jhop.com
Fri Jun 15 20:52:38 UTC 2007


This seems too easy.  Am I missing something?  :)

 cat file1 file2  | grep 'updates-released-f7'  | wc -l

Or as a bash script:
$ cat count-updates-rel-7.sh
#!/bin/bash
cat ${*} | grep 'updates-released-f7' | wc -l


Jason


Mike McGrath wrote:
> I've got a script request for anyone who's interested (I'm both busy 
> and too lazy to write it myself)
>
> I'd like to count the number of 'updates-released-7' requests in our 
> mirror logs that have happened in the last 24 hours.  The script 
> should take two files as input and return a single integer, using 
> bash.  Here's a sample log:
>
> http://mmcgrath.net/~mmcgrath/mirrors
>
> happy hacking
>
>    -Mike
>
> _______________________________________________
> Fedora-infrastructure-list mailing list
> Fedora-infrastructure-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list




More information about the Fedora-infrastructure-list mailing list