lastcomm and .bz2 accounting files
Hi,
Is there a good one liner to uncompress and read the output and sort it by high load average on any .bz2 process accounting file ?
I recently thought the command below worked, but now I see it does'nt work at all and lastcomm just reads the current file.
I wanted to avoid copying the file to /tmp, uncompressing and then reading it.
Is there a simple way around this, I can't help but think i'm missing something obvious.
bzip2 -dc pacct.0116.bz2 | lastcomm -- | sed 's/ \([0-9]\)/~\1/' | awk -F"~" 'BEGIN{OFS="~"}{ print $2,$1 }' | sort -n | awk -F"~" '{ print $2,$1 }' | tail -25
Thanks
|