Search Results

Search: Posts Made By: sQew
8,742
Posted By rdcwayx
awk '{a[$1]++} END{for (i in a) {if (a[i]>10)...
awk '{a[$1]++}
END{for (i in a) {if (a[i]>10) {c=(c=="")?i:c FS i}
else {b=(b=="")?i:b FS i}
}
print "code than 10:", c |"mailx your@mail.com";
...
8,742
Posted By pludi
@R0H0N: calling uniq will squeeze together...
@R0H0N: calling uniq will squeeze together similar lines, thus reducing the reported vs. real number of lines matching. Also, UUOC (http://partmaps.org/era/unix/award.html#cat)

Simpler:
errors=$(...
8,742
Posted By
cat inputfile | cut -f1 | uniq | while read line ...
cat inputfile | cut -f1 | uniq | while read line
do
count=`grep "$line" inputfile | wc -l`
if [ $count -gt 10 ] ; then
mail -s "subject:more than 10" abc@abc.com
else
mail -s...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 01:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy