Linux.com

CLI Magic: For geek cred, try these one-liners

Posted by: Anonymous [ip: 66.151.59.138] on July 23, 2008 08:52 PM
A few things here...
This:
grep '@' incoming_email | gawk '{print $3}' | sort | uniq

Can become:
gawk '/@/{print $3}' incoming_email | sort -u

The trick for showing the top 5 processes is pretty handy. Here are a few of my own in scripts I've written:
http://www.digitalprognosis.com/opensource/scripts/top-open-files
http://www.digitalprognosis.com/opensource/scripts/top-disk-users

These scripts might help someone else

---
Jeff Schroeder
http://www.digitalprognosis.com/blog

#

Return to CLI Magic: For geek cred, try these one-liners