0

Hi Guys

I have created a script and everything works but i want my script to sort by the highest count etc.

The script counts the amount of times a job fails , for example the output looks like this:

u08.joebloggs.ndm has failed 1 times
u09joeblogs.rpt has failed 5 times
u10.joeblogs.fw has failed 1 times

How can i get the script to sorted it but the highest amount of times failed.

do i have to use nawk some how, nawk print $ 4 then sort maybe???

Any ideas would be great

2
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by skelly16
0

Hi

The data is emailed to me so its all held here

cat $HOME/scripts/autoinfo1.txt | mailx -s "job failure" joeblogg@hotmail.com

that sort command doesnt work against the script, or if i pipe after i cat the file.

0

excellent it work, thanks alot

so what does the sort +3nr mean??

0

got it skip the first 3 fields then sort numerically reverse order, cheers

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.