Learn about Linux
Download Linux
Get Linux help
Get special offers on:
Linux Application Dev Programming Software
Email:
#
Return to CLI Magic: For geek cred, try these one-liners
© Copyright 1999-2008 - SourceForge, Inc., All Rights Reserved About Linux.com - Privacy Statement - Terms of Use - Advertise - Trademark - Ask Linux Questions - Write for Us - RSS Feed ThinkGeek - Slashdot - SourceForge.net - freshmeat - Surveys - Jobs
CLI Magic: For geek cred, try these one-liners
Posted by: Anonymous [ip: 66.151.59.138] on July 23, 2008 08:52 PMThis:
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
#