<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-19570452</id><updated>2011-07-14T19:34:38.979-05:00</updated><title type='text'>South Alabama Linux User Group</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://salug-mobile.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://salug-mobile.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>The Redactor</name><uri>http://www.blogger.com/profile/13710866187777119879</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.netsteele.com/~steelmi1/images/dalek1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-19570452.post-114174881208384386</id><published>2006-03-07T10:21:00.000-06:00</published><updated>2006-03-07T10:27:09.633-06:00</updated><title type='text'>SALUG Trivia Question</title><content type='html'>From me to you.&lt;br /&gt;&lt;br /&gt;There is no prize for this, but I have a trivia question for all of you SALUG'ers...&lt;br /&gt;&lt;br /&gt;Can anyone (besides WCB, Johnny, or Shawn) tell me why the following happens:&lt;br /&gt;&lt;br /&gt;1. Log in to spaceghost over ssh.&lt;br /&gt;2. Use pine to send an email to another email address of yours. Begin the first line of the body with the phrase: From me to you.&lt;br /&gt;3. When you recive the message, the word "From" will &lt;I&gt;most likely&lt;/I&gt; be "quoted" by your mail reader similar to this:&lt;br /&gt;&lt;br /&gt;&gt;From me to you.&lt;br /&gt;&lt;br /&gt;Why?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19570452-114174881208384386?l=salug-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://salug-mobile.blogspot.com/feeds/114174881208384386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19570452&amp;postID=114174881208384386' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/114174881208384386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/114174881208384386'/><link rel='alternate' type='text/html' href='http://salug-mobile.blogspot.com/2006/03/salug-trivia-question.html' title='SALUG Trivia Question'/><author><name>The Redactor</name><uri>http://www.blogger.com/profile/13710866187777119879</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.netsteele.com/~steelmi1/images/dalek1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19570452.post-113949816329005050</id><published>2006-02-09T09:08:00.000-06:00</published><updated>2006-02-09T09:16:03.330-06:00</updated><title type='text'>KDE DCOP Article</title><content type='html'>In preparation for the workshop, I thought that I'd post &lt;a href="http://www.volny.cz/bwian/dcop.html"&gt; this &lt;/a&gt; link to an article introducing KDE's DCOP functionality.&lt;br /&gt;&lt;br /&gt;Think of DCOP as a way of scripting GUI applications.  If there are any OS X users here, DCOP is to KDE as ApplScript is to OS X.&lt;br /&gt;&lt;br /&gt;The possibilities here are limitless.  The only downside is that in order to use DCOP, your application has to be a full-fledged KDE application, not just an app built with QT, Gnome, or plain-old X11.  This is because DCOP is part of the KDE framework... one of the things you get for "free" when you build a KDE app.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19570452-113949816329005050?l=salug-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://salug-mobile.blogspot.com/feeds/113949816329005050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19570452&amp;postID=113949816329005050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113949816329005050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113949816329005050'/><link rel='alternate' type='text/html' href='http://salug-mobile.blogspot.com/2006/02/kde-dcop-article.html' title='KDE DCOP Article'/><author><name>The Redactor</name><uri>http://www.blogger.com/profile/13710866187777119879</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.netsteele.com/~steelmi1/images/dalek1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19570452.post-113474834996226153</id><published>2005-12-16T09:42:00.000-06:00</published><updated>2005-12-16T09:52:29.963-06:00</updated><title type='text'>Sun's Free Developer Tools -- Now on Linux</title><content type='html'>A couple of weeks ago, Sun released a LOT of their software for free (beer).&lt;br /&gt;&lt;br /&gt;Among the products that are now free are Solaris for x86 machines, and Sun Studio 11.  If you haven't tried out Solaris on x86, you should look at it some time.  It isn't quite the same as Linux, but it really isn't much different than moving from Fedora Core to Debian.&lt;br /&gt;&lt;br /&gt;As for Sun Studio 11, this is Sun's developer suite.  It comes with C, C++, and FORTRAN compilers and an IDE.  I haven't looked at the Linux version yet.  Look &lt;a href="http://www.sun.com/software/products/studio/get.xml"&gt;here&lt;/a&gt; for downloads.&lt;br /&gt;&lt;br /&gt;If Java is more your bent, then the NetBeans IDE is also available &lt;a href="http://www.netbeans.org/community/releases/50/"&gt; here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19570452-113474834996226153?l=salug-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://salug-mobile.blogspot.com/feeds/113474834996226153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19570452&amp;postID=113474834996226153' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113474834996226153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113474834996226153'/><link rel='alternate' type='text/html' href='http://salug-mobile.blogspot.com/2005/12/suns-free-developer-tools-now-on-linux.html' title='Sun&apos;s Free Developer Tools -- Now on Linux'/><author><name>The Redactor</name><uri>http://www.blogger.com/profile/13710866187777119879</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.netsteele.com/~steelmi1/images/dalek1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19570452.post-113474774926267093</id><published>2005-12-16T09:36:00.000-06:00</published><updated>2005-12-16T09:42:29.276-06:00</updated><title type='text'>Object Oriented Programming Tutorial</title><content type='html'>In yesterday's post about Rails 1.0, I mentioned that in order to best use Rails it would be helpful if you had some OOP experience.&lt;br /&gt;&lt;br /&gt;If you don't, then &lt;a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/OOProgramming/chapter_3_section_1.html#//apple_ref/doc/uid/20001423"&gt;this &lt;/a&gt;document at Apple's developer site is quite good for explaining the concepts involved.&lt;br /&gt;&lt;br /&gt;The above link is one chapter in a book about programming in Objective C, the basis for much of the NeXT STEP OS, and its BSD-based progeny - Mac OS X.  That being said, the Objective C programming language &lt;I&gt;is&lt;/I&gt; part of the GCC suite, and is probably already installed on your Linux machine.  Surprise.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19570452-113474774926267093?l=salug-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://salug-mobile.blogspot.com/feeds/113474774926267093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19570452&amp;postID=113474774926267093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113474774926267093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113474774926267093'/><link rel='alternate' type='text/html' href='http://salug-mobile.blogspot.com/2005/12/object-oriented-programming-tutorial.html' title='Object Oriented Programming Tutorial'/><author><name>The Redactor</name><uri>http://www.blogger.com/profile/13710866187777119879</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.netsteele.com/~steelmi1/images/dalek1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19570452.post-113467635327086338</id><published>2005-12-15T13:44:00.000-06:00</published><updated>2005-12-15T13:52:33.283-06:00</updated><title type='text'>Rails 1.0 is out!</title><content type='html'>For those of you who have to write web applications, and don't know about Ruby on Rails, you're missing out on a lot.&lt;br /&gt;&lt;br /&gt;Rails is a web development framework that uses the Ruby programming language.  Its claim to fame is that once you learn the Rails "conventions," you can write a fully functional web application in very little time.  The conventions they're talking about center mostly on how to name variables and how to structure your SQL tables so that the framework does most of the work for you.&lt;br /&gt;&lt;br /&gt;It helps if you've had some Object Oriented programming experience, but if you haven't there are some good tutorials for how to get started with Ruby and Rails on the web site.  In fact, the first edition of the canonical Ruby text (know as the Pick-Axe Book) is available for free on the web.  The second edition is available in a non-DRM'ed .pdf format from the publisher for $25... About half the cost of the printed version.  There is also a Rails specific book available from the same publisher, "Agile Web Development with Rails."&lt;br /&gt;&lt;br /&gt;I bought both of them, and they're quite good.&lt;br /&gt;&lt;br /&gt;Rails version 1.0 was released on Tuesday.  It is available at &lt;a href="http://www.rubyonrails.org"&gt;www.rubyonrails.org&lt;/A&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19570452-113467635327086338?l=salug-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://salug-mobile.blogspot.com/feeds/113467635327086338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19570452&amp;postID=113467635327086338' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113467635327086338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113467635327086338'/><link rel='alternate' type='text/html' href='http://salug-mobile.blogspot.com/2005/12/rails-10-is-out.html' title='Rails 1.0 is out!'/><author><name>The Redactor</name><uri>http://www.blogger.com/profile/13710866187777119879</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.netsteele.com/~steelmi1/images/dalek1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19570452.post-113415770177487782</id><published>2005-12-09T13:45:00.000-06:00</published><updated>2005-12-09T13:48:21.773-06:00</updated><title type='text'>Test of cross-posting SALUG blogger posts to members list.</title><content type='html'>I set up the SALUG blogger.com page to automatically forward new posts to the members mail list.  That way everyone can see new posts without having to remember to check http://salug-mobile.blogger.com.  I still recommend using the RSS/ATOM feed though.  Firefox has "Live Bookmarks" that work ok.  &lt;br /&gt;&lt;br /&gt;If people complain about too much traffic, I can always turn this off.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19570452-113415770177487782?l=salug-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://salug-mobile.blogspot.com/feeds/113415770177487782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19570452&amp;postID=113415770177487782' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113415770177487782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113415770177487782'/><link rel='alternate' type='text/html' href='http://salug-mobile.blogspot.com/2005/12/test-of-cross-posting-salug-blogger.html' title='Test of cross-posting SALUG blogger posts to members list.'/><author><name>The Redactor</name><uri>http://www.blogger.com/profile/13710866187777119879</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.netsteele.com/~steelmi1/images/dalek1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19570452.post-113379453967916097</id><published>2005-12-05T08:52:00.000-06:00</published><updated>2005-12-05T08:55:43.703-06:00</updated><title type='text'>Vanity...</title><content type='html'>I hate it when "my account" has already been registered on a site.  The nerve of some of the other &gt;1 Billion Internet users out there to have the same First Initial and Last Name as me or to just take "my account" as their own. Oh well, at least there's only one SpaceGhost....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19570452-113379453967916097?l=salug-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://salug-mobile.blogspot.com/feeds/113379453967916097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19570452&amp;postID=113379453967916097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113379453967916097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113379453967916097'/><link rel='alternate' type='text/html' href='http://salug-mobile.blogspot.com/2005/12/vanity.html' title='Vanity...'/><author><name>J Busby</name><uri>http://www.blogger.com/profile/02864348836864602843</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19570452.post-113372263415981797</id><published>2005-12-04T12:55:00.000-06:00</published><updated>2005-12-04T16:47:23.216-06:00</updated><title type='text'>Getting into AWKward situations</title><content type='html'>&lt;div id="columns"&gt;&lt;br /&gt; &lt;div id="side"&gt;&lt;br /&gt; &lt;p&gt;&lt;a href="#top"&gt;Intro&lt;/A&gt;&lt;br /&gt; &lt;p&gt;&lt;a href="#proc"&gt;Processes&lt;/A&gt;&lt;br /&gt; &lt;p&gt;&lt;a href="#passwd"&gt;/etc/passwd&lt;/A&gt;&lt;br /&gt; &lt;p&gt;&lt;a href="#perf"&gt;Performance&lt;/A&gt;&lt;br /&gt; &lt;p&gt;&lt;a href="#csv"&gt;CSV Files&lt;/A&gt;&lt;br /&gt; &lt;p&gt;&lt;a href="#conc"&gt;Conclusion&lt;/A&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt; &lt;div id="main"&gt;&lt;br /&gt;&lt;h2 id="top"&gt;Intro&lt;/h2&gt;&lt;br /&gt;&lt;P&gt;Awk is a programming language that is installed on every UNIX and Linux system I've ever seen.  The manual page claims that is is specified as part of POSIX 1003.2, but that is way more technical than I want to get here.  I'd rather spend the space showing you how to take care of some common tasks quicker with Awk than you'd be able to do by hand...&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Awk is mostly a text processing language.  It is lighter than Perl, and very often will do exactly what you need for day-to-day system administration tasks.  I'll break down a few of these cases for you now...&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2 id="proc"&gt;Killing off a lot of processes in a hurry&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;I don't think that using the 'killall' command is a good habit to get into.  On Linux and Mac OS X, it works fine if you type "killall mozilla" to kill-off all running Mozilla processes.  On other UNIXes (Solaris, notably), killall ignores any parameters you pass it, killing-off most of the processes running on your system.  Now, you could (and in most cases should) use the pkill command (also available on Linux), but for the purpose of this discussion, we're going to use awk.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;If we run ps -ef, we see output that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ ps -ef&lt;br /&gt;&lt;br /&gt;UID        PID  PPID  C STIME TTY          TIME CMD&lt;br /&gt;root         1     0  0 Sep06 ?        00:00:22 init [2] &lt;br /&gt;root         2     1  0 Sep06 ?        00:01:34 [kswapd]&lt;br /&gt;root         3     1  0 Sep06 ?        00:00:00 [kreclaimd]&lt;br /&gt;root         4     1  0 Sep06 ?        00:02:16 [kflushd]&lt;br /&gt;root         5     1  0 Sep06 ?        00:00:33 [kupdate]&lt;br /&gt;root       364     1  0 Sep06 ?        00:02:13 /sbin/syslogd&lt;br /&gt;root       372     1  0 Sep06 ?        00:00:00 /sbin/klogd&lt;br /&gt;root       376     1  0 Sep06 ?        00:04:29 /usr/sbin/named&lt;br /&gt;root       387     1  0 Sep06 ?        00:00:01 /usr/sbin/inetd&lt;br /&gt;root       390     1  0 Sep06 ?        00:00:00 /usr/sbin/ippl&lt;br /&gt;root       393   390  0 Sep06 ?        00:00:11 /usr/sbin/ippl&lt;br /&gt;root       402     1  0 Sep06 ?        00:00:00 /bin/sh /usr/bin/safe_mysqld&lt;br /&gt;mysql      437   402  0 Sep06 ?        00:00:00 /usr/sbin/mysqld&lt;br /&gt;mysql      442   437  0 Sep06 ?        00:00:12 /usr/sbin/mysqld&lt;br /&gt;mysql      443   442  0 Sep06 ?        00:00:00 /usr/sbin/mysqld&lt;br /&gt;mysql      446   442  0 Sep06 ?        00:00:00 /usr/sbin/mysqld&lt;br /&gt;root       646     1  0 Sep06 ?        00:00:06 /usr/sbin/sshd&lt;br /&gt;root       649     1  0 Sep06 ?        00:00:42 /usr/sbin/ntpd&lt;br /&gt;root       653     1  0 Sep06 ?        00:00:16 /usr/sbin/cron&lt;br /&gt;root       662     1  0 Sep06 ?        00:01:20 sendmail: MTA: accepting connections      &lt;br /&gt;root       668     1  0 Sep06 tty2     00:00:00 /sbin/getty 38400 tty2&lt;br /&gt;root       669     1  0 Sep06 tty3     00:00:00 /sbin/getty 38400 tty3&lt;br /&gt;root       670     1  0 Sep06 tty4     00:00:00 /sbin/getty 38400 tty4&lt;br /&gt;root       671     1  0 Sep06 tty5     00:00:00 /sbin/getty 38400 tty5&lt;br /&gt;root       672     1  0 Sep06 tty6     00:00:00 /sbin/getty 38400 tty6&lt;br /&gt;root       714     1  0 Sep06 tty1     00:00:00 /sbin/getty 38400 tty1&lt;br /&gt;root      5557     1  0 Sep06 ?        00:00:49 /usr/sbin/apache&lt;br /&gt;gabby     8410   387  0 Sep06 ?        00:00:36 imapd&lt;br /&gt;root     10741   646  0 Sep07 ?        00:00:00 /usr/sbin/sshd&lt;br /&gt;dhansen  10743 10741  0 Sep07 ?        00:00:00 /usr/sbin/sshd&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;You will notice that the output is layer out in different columns (or "fields").&lt;br /&gt;&lt;br /&gt;&lt;P&gt;By using a pipe, we can ask awk to print for us only the specified fields:&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ ps -ef | awk '{print $1, $8}'&lt;br /&gt;&lt;br /&gt;UID CMD&lt;br /&gt;root init&lt;br /&gt;root [kswapd]&lt;br /&gt;root [kreclaimd]&lt;br /&gt;root [kflushd]&lt;br /&gt;root [kupdate]&lt;br /&gt;root /sbin/syslogd&lt;br /&gt;root /sbin/klogd&lt;br /&gt;root /usr/sbin/named&lt;br /&gt;root /usr/sbin/inetd&lt;br /&gt;root /usr/sbin/ippl&lt;br /&gt;root /usr/sbin/ippl&lt;br /&gt;root /bin/sh&lt;br /&gt;mysql /usr/sbin/mysqld&lt;br /&gt;mysql /usr/sbin/mysqld&lt;br /&gt;mysql /usr/sbin/mysqld&lt;br /&gt;mysql /usr/sbin/mysqld&lt;br /&gt;root /usr/sbin/sshd&lt;br /&gt;root /usr/sbin/ntpd&lt;br /&gt;root /usr/sbin/cron&lt;br /&gt;root sendmail:&lt;br /&gt;root /sbin/getty&lt;br /&gt;root /sbin/getty&lt;br /&gt;root /sbin/getty&lt;br /&gt;root /sbin/getty&lt;br /&gt;root /sbin/getty&lt;br /&gt;root /sbin/getty&lt;br /&gt;root /usr/sbin/apache&lt;br /&gt;gabby imapd&lt;br /&gt;root /usr/sbin/sshd&lt;br /&gt;dhansen /usr/sbin/sshd&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;P&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;In this case, we asked awk to print the first ($1) and eighth ($8) fields.  By default, awk will split fields whenever it encounters white-space.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;How does this help us kill-off a lot of processes at once?  Simply.  Notice that in the first example, that field 2 ($2) contains the PID of the running programs.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Suppose that we wanted to kill-off all imapd instances.  We might start by doing this:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ ps -ef | grep imapd&lt;br /&gt;&lt;br /&gt;gabby     8410   387  0 Sep06 ?        00:00:36 imapd&lt;br /&gt;smiss    27005   387  0 Sep11 ?        00:00:08 imapd&lt;br /&gt;knox     31839   387  0 07:37 ?        00:00:01 imapd&lt;br /&gt;knox     31968   387  0 07:42 ?        00:00:01 imapd&lt;br /&gt;jbusby    1182   387  1 11:27 ?        00:00:03 imapd&lt;br /&gt;steelmi1  1214  1117  0 11:31 pts/0    00:00:00 grep imapd&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Ok, good.  $2 contains the PID for all of the instances we want to kill.  So, we refine it a step:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ ps -ef | grep imapd | awk '{print $2}'&lt;br /&gt;&lt;br /&gt;8410&lt;br /&gt;27005&lt;br /&gt;31839&lt;br /&gt;31968&lt;br /&gt;1182&lt;br /&gt;1223&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Excellent.  We now have a list of PIDs by themselves.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Now, kill, like most UNIX commands will accept input parameters in the form of a list, meaning for instance that we could do this:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;kill -9 8410 27005 31839 ...&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;However, we don't want to risk typing the wrong PID and risk killing some important process.  So, using back-ticks, we tell the shell to substitute the output of our awk statement into the input of kill:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ sudo kill -9 `ps -ef | grep imapd | awk '{print $2}'`&lt;br /&gt;&lt;br /&gt;bash: kill: (1223) - No such process&lt;br /&gt;&lt;br /&gt;$&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;You will probably get back something like the above line telling you "No such process."  This is because when we do our ps -ef | grep imapd, your grep shows up in the list too.  It is annoying, but we can fix it like such:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;kill -9 `ps -ef | grep imapd | grep -v grep | awk '{print $2}'`&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;We simply add an extra grep to filter out occurrences of the string 'grep' in the output of the ps.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;You can also kill-off processes based on any criteria that you can uniquely grep for.  For instance, if you wanted to kill all processes owned by a specific user, or all processes that have the string "Aug" in the fourth column, etc...&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2 id="passwd"&gt;Reporting on /etc/password and/or /etc/shadow&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Until this point, we have used awk with the default field separator (any white space).  But, what if we need to process a stream that is split into fields, but uses something different to separate them?  Awk is up to the task.  We simply use the -F parameter to specify it.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;For example, /etc/password is split into well known fields, separated by ":"&lt;br /&gt;&lt;br /&gt;&lt;P&gt;The output of&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ man 5 passwd &lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;tells us:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;NAME&lt;br /&gt;       passwd - The password file&lt;br /&gt;&lt;br /&gt;DESCRIPTION&lt;br /&gt;       passwd contains various pieces of information for each user account.  Included is&lt;br /&gt;&lt;br /&gt;            Login name&lt;br /&gt;&lt;br /&gt;            Optional encrypted password&lt;br /&gt;&lt;br /&gt;            Numerical user ID&lt;br /&gt;&lt;br /&gt;            Numerical group ID&lt;br /&gt;&lt;br /&gt;            User name or comment field&lt;br /&gt;&lt;br /&gt;            User home directory&lt;br /&gt;&lt;br /&gt;            User command interpreter&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;So, $1 will be the login name, $2 the optional encrypted password, and so-on.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Let's say we'd like to see just the login name and comment field for all users on the system.  We'd need $1 and $5:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F: '{print $1, $5}' /etc/passwd&lt;br /&gt;&lt;br /&gt;root root&lt;br /&gt;daemon daemon&lt;br /&gt;bin bin&lt;br /&gt;sys sys&lt;br /&gt;sync sync&lt;br /&gt;games games&lt;br /&gt;man man&lt;br /&gt;lp lp&lt;br /&gt;mail mail&lt;br /&gt;news news&lt;br /&gt;uucp uucp&lt;br /&gt;proxy proxy&lt;br /&gt;mailman Mailman&lt;br /&gt;majordom Majordomo&lt;br /&gt;postgres postgres&lt;br /&gt;www-data www-data&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Hmm, we notice here that we get a lot of built-in system accounts that we really didn't care about...&lt;br /&gt;However, if we look in /etc/passwd, we notice that our actual users have UIDs (in $3) that are numbered greater than 999.  No problem, awk is a grown-up programming language, and supports conditionals.  I'll break it into lines to make it more readable... Just hit enter at the end of each line:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F: '{&lt;br /&gt;if ($3 &gt; 999)&lt;br /&gt; print $1, $5&lt;br /&gt;}' /etc/passwd&lt;br /&gt;&lt;br /&gt;nobody nobody&lt;br /&gt;steelmi1 Michael Steele&lt;br /&gt;jbusby Johnny E Busby II&lt;br /&gt;smiss Stacy Busby&lt;br /&gt;bwood William Wood&lt;br /&gt;mcmillan Barry McMillan&lt;br /&gt;rroth Ryan B. Roth&lt;br /&gt;jmurrah Josh Murrah&lt;br /&gt;paul Paul Watson&lt;br /&gt;knox The Knoxster&lt;br /&gt;dhansen David Hansen&lt;br /&gt;mcoker Bonehead,,,&lt;br /&gt;amerus Nicolai Pavlov&lt;br /&gt;jjardina Jason Jardina&lt;br /&gt;davidm David McMillan&lt;br /&gt;dspisak Dana Spisak&lt;br /&gt;jberg Jonathan Bergmann&lt;br /&gt;webguru SALUG WWW Guru&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Better.  But it might be nice to have the list sorted by login name instead of by UID:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F: '{ &lt;br /&gt;if ($3 &gt; 999)&lt;br /&gt;    print $1, $5&lt;br /&gt;}' /etc/passwd | sort&lt;br /&gt;&lt;br /&gt;aearon Chris Shiver&lt;br /&gt;amerus Nicolai Pavlov&lt;br /&gt;bbrenner &lt;br /&gt;billman Billy Beaty&lt;br /&gt;bishop Rod Steiner&lt;br /&gt;bmiddlet Brent Middleton&lt;br /&gt;bobbyrd &lt;br /&gt;bwood William Wood&lt;br /&gt;byost Barry Yost&lt;br /&gt;cbgamb Charles Gambrell&lt;br /&gt;cfleming Chris Fleming&lt;br /&gt;chioke Chioke Jaffree&lt;br /&gt;clegros Clint LeGros&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Nice.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Now, let's put that comment field into "" marks, and add a "--&gt;" between the fields in the output, so it is easier to read:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F: '{ &lt;br /&gt;if ($3 &gt; 999)&lt;br /&gt;    print $1, "--&gt; \"" $5 "\""&lt;br /&gt;}' /etc/passwd | sort&lt;br /&gt;&lt;br /&gt;aearon --&gt; "Chris Shiver"&lt;br /&gt;amerus --&gt; "Nicolai Pavlov"&lt;br /&gt;bbrenner --&gt; ""&lt;br /&gt;billman --&gt; "Billy Beaty"&lt;br /&gt;bishop --&gt; "Rod Steiner"&lt;br /&gt;bmiddlet --&gt; "Brent Middleton"&lt;br /&gt;bobbyrd --&gt; ""&lt;br /&gt;bwood --&gt; "William Wood"&lt;br /&gt;byost --&gt; "Barry Yost"&lt;br /&gt;cbgamb --&gt; "Charles Gambrell"&lt;br /&gt;cfleming --&gt; "Chris Fleming"&lt;br /&gt;chioke --&gt; "Chioke Jaffree"&lt;br /&gt;clegros --&gt; "Clint LeGros"&lt;br /&gt;coil --&gt; "COIL Quake Clan"&lt;br /&gt;davidm --&gt; "David McMillan"&lt;br /&gt;dbaxter --&gt; "Dave Baxter"&lt;br /&gt;dhandjr --&gt; ""&lt;br /&gt;dhansen --&gt; "David Hansen"&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;As you can see, the print statement becomes a little more complex, as we have to use a \ to escape the " marks that we want printed to the output stream.  And you'll also notice that the string-literals you want to output have to be enclosed in quotes.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;What if we needed to find out in a hurry how many non-system accounts are on our system?&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Easy:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F: '{&lt;br /&gt;if ($3 &gt; 999)&lt;br /&gt;print $1, $5&lt;br /&gt;}' /etc/passwd | wc -l&lt;br /&gt;&lt;br /&gt;     66&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Also, there is no rule that says you have to print the fields in order.  You can just as easily '{print $5, $1}' as you can the other way around.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;If you look at the man page for shadow(5), you will see that /etc/shadow has well-defined fields too.  In this case though, $5 is the length of time before the user has to change his password.  Let's say you want to find out the user names that do not have to change their passwords for more than 90 days.  You won't be able to do this on a machine unless you are root:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;# awk -F: '{&lt;br /&gt;if ($5 &gt; 90)&lt;br /&gt; print $1&lt;br /&gt;}' /etc/shadow | sort&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2 id="perf"&gt;Performance Stats&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;We use the sar program at work to get a general idea of system performance metrics.  In Linux, sar is part of the sysstat package, but this example was done on Solaris 9.  Your mileage may vary.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Running sar without any parameters produces CPU utilization output in the following columns:&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;Time %usr %sys %wio %idle&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Here is a sample:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ sar&lt;br /&gt;&lt;br /&gt;SunOS spiderman 5.9 Generic_118558-09 sun4u    09/12/2005&lt;br /&gt;&lt;br /&gt;00:00:00    %usr    %sys    %wio   %idle&lt;br /&gt;00:01:00       0      11       1      88&lt;br /&gt;00:02:01       1      10       0      89&lt;br /&gt;00:03:00       0      10       0      89&lt;br /&gt;00:04:00       0      10       0      90&lt;br /&gt;00:05:00       1      10       0      89&lt;br /&gt;00:06:00       0      10       0      90&lt;br /&gt;00:07:01       1      10       0      90&lt;br /&gt;00:08:00       0      10       0      90&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Average        1       1       0      98&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;The %idle column == 100% - (%usr + %sys + %wio).  So if %idle == 15 for one sample, then the system was %85 busy, and if %idle == 88, then we know that the system was %12 busy.  It might be nice to turn that around, so we could graph just the sample time and %busy -- which isn't a column in our output -- without having to do arithmetic in our heads.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Before we fire up awk, we think ahead just a little bit, and notice that we have some header/footer information that is going to junk-up our output.  With some planning, we can grep our way out of trouble.  We want to ignore:&lt;br /&gt; &lt;OL&gt;&lt;br /&gt;&lt;br /&gt;  &lt;LI&gt;Lines that start with the string SunOS&lt;br /&gt;  &lt;LI&gt;Lines that have the column headers in them&lt;br /&gt;  &lt;LI&gt;Blank lines&lt;br /&gt;  &lt;LI&gt;Lines that start with the string Average&lt;br /&gt; &lt;/OL&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Here is our command:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ sar | egrep -v '^SunOS|usr|^$|^Average' | awk '{ print $1, (100 - $NF) }'&lt;br /&gt;&lt;br /&gt;00:01:00 12&lt;br /&gt;00:02:01 11&lt;br /&gt;00:03:00 11&lt;br /&gt;00:04:00 10&lt;br /&gt;00:05:00 11&lt;br /&gt;00:06:00 10&lt;br /&gt;00:07:01 10&lt;br /&gt;00:08:00 10&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;You'll notice several new bits of syntax here.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;First, we've switched from grep to egrep.  This gives us more flexibility with regular expressions than the normal version of grep on some systems.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Next, we're using the -v option to tell grep to reverse its search.  Instead of showing us the lines that contain the patterns listed, show us the lines that DON'T contain the patterns listed.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Then, we have the patterns enclosed in single quotes, and separated by the "or" comparison operator. So 'pattern1|pattern2' means the line matches if it contains "pattern1" or if it contains "pattern2" etc...&lt;br /&gt;&lt;br /&gt;&lt;P&gt;The patterns individually are:&lt;br /&gt; &lt;OL&gt;&lt;br /&gt;  &lt;LI&gt;^SunOS --&gt; The line starts with (that's what the ^ symbol means) the string SunOS&lt;br /&gt;  &lt;LI&gt;usr    --&gt; The line contains the string 'usr' which is one of the column headers&lt;br /&gt;  &lt;LI&gt;^$     --&gt; The line starts with an end of line (that is what the $ symbol means), which means the line is blank.&lt;br /&gt;  &lt;LI&gt;^Average --&gt; The line starts with the string "Average".&lt;br /&gt; &lt;/OL&gt;&lt;br /&gt;&lt;P&gt;Finally, we use awk as we normally would, except that we use an arithmetic expression of 100 subtracted from the value of a&lt;br /&gt;field called $NF that we've never seen before. Awk keeps several variables hanging around and automatically defined to help&lt;br /&gt;make your life easier.  One of these variables is NF which stands for "Number of Fields."  Since awk starts numbering fields at&lt;br /&gt;1, this means that $NF just refers to "the value of the last field, whichever that is."&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Since that is the case, you can also do things like '{print $(NF - 1)}' which says to print 1 field before the last field.&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2 id="csv"&gt;CSV Files&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;One final topic of discussion is files that contain rows (records) of Comma Separated Values.  In reality, you'll probably have to deal with these quite often, usually when a user needs some data moved between UNIX and an Excel spreadsheet.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;There's nothing to panic over... Awk is quite good at this, provided that your records don't have commas inside the columns. For instance this is a row:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;"Field one has no commas in it.","Field two however, does.","Field three is fine again."&lt;br /&gt;&lt;br /&gt;&lt;P&gt;If we paste this text into a file called infile.txt, then tell awk to print fields 1, 2, and 3, each on their own line, this is&lt;br /&gt;what we get:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F, '{print $1 "\n" $2 "\n" $3}' infile.txt&lt;br /&gt;&lt;br /&gt;"Field one has no commas in it."&lt;br /&gt;"Field two however&lt;br /&gt; does."&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Eww.  In reality, that happens quite a bit too.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Different versions of Awk handle this with varying degrees of success.  I typically just work around it, by making " my field separator, and incrementing each column as needed to get the right result:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F\" '{print $2 "\n" $4 "\n" $6}' infile.txt&lt;br /&gt;&lt;br /&gt;Field one has no commas in it.&lt;br /&gt;Field two however, does.&lt;br /&gt;Field three is fine again. &lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;This method isn't fool-proof, and you may end up wasting a lot of time trying to get the right result out of it.  &lt;br /&gt;&lt;br /&gt;&lt;P&gt;With GNU Awk (shipped with most Linux distributions), I was able to get away with using the two characters ", together (properly escaped, of course) as a field separator.  This yielded some success:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F\", '{print $1 "\n" $2 "\n" $3}' infile.txt&lt;br /&gt;&lt;br /&gt;"Field one has no commas in it.&lt;br /&gt;"Field two however, does.&lt;br /&gt;"Field three is fine again."&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Mac OS X (10.4.2) worked this same way, as expected.&lt;br /&gt;&lt;br /&gt;&lt;P&gt;But it didn't give the correct result on Solaris 9's default awk.&lt;br /&gt;However, there is a "legacy" version of Awk that looks like a relic from&lt;br /&gt;Solaris 2.4 in /usr/xpg4/bin/awk that worked fine.  GNU Awk on Solaris&lt;br /&gt;would probably also yield the correct result.  This is just another&lt;br /&gt;example of the subtle variations between different UNIXes (and even&lt;br /&gt;different iterations of the same UNIX!).  Part of being a good system&lt;br /&gt;administrator is learning how to deal with these little problems that&lt;br /&gt;end up taking a long time to sort out because "That should work!" or "It&lt;br /&gt;works just fine on &amp;lt;OS&amp;gt;!"  Being flexible often means knowing more than one way to work around a problem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Also notice, that all lines except the last one have their ending " removed.  In this case, you might clean it up a little with sed, if you don't care about losing all of the " marks:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F\", '{print $1 "\n" $2 "\n" $3}' infile.txt | sed 's/\"//g'&lt;br /&gt;&lt;br /&gt;Field one has no commas in it.&lt;br /&gt;Field two however, does.&lt;br /&gt;Field three is fine again.&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;Alternatively, you could get a little more complex, and use sed to put the ending quotes back, depending on the situation: &lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F\", '{print $1 "\n" $2 "\n" $3}' infile.txt | sed 's/\.$/\.\"/'&lt;br /&gt;&lt;br /&gt;"Field one has no commas in it."&lt;br /&gt;"Field two however, does."&lt;br /&gt;"Field three is fine again."&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;You might have some luck with a more complex expression, using Awk's split() function to do a better job, a Google search yielded several nasty example.  Past a certain complexity I prefer to up-shift into Perl.&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2 id="conc"&gt;Conclusion&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;We've really only scratched the surface of Awk.  It can do a whole lot more, but we're just looking to pick the low-hanging&lt;br /&gt;fruit.  I've shown you how to solve some real-world problems quickly, without having to write tons of Perl or resorting to&lt;br /&gt;pasting the data into Excel for manipulation.  Once you get awk into your repertories, you will be able to do some amazing things.&lt;br /&gt;You'll be able to get answers for your boss quicker, you'll be able to rearrange data for customers or coworkers on-the-fly.&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;&lt;h2 id="comments"&gt;Comments&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;jbusby wrote in to remind me that in our passwd example, we can&lt;br /&gt;specify an Output Field Separator with awk's OFS option to make things a&lt;br /&gt;little bit neater.  So this:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F: '{ &lt;br /&gt;if ($3 &gt; 999)&lt;br /&gt;    print $1, "--&gt; \"" $5 "\""&lt;br /&gt;}' /etc/passwd | sort&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;becomes this:&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;div&gt;&lt;pre&gt;$ awk -F: '{&lt;br /&gt;OFS=" --&gt; "&lt;br /&gt;if ($3 &gt; 999)&lt;br /&gt;    print $1,"\"" $5 "\""&lt;br /&gt;}' /etc/passwd | sort&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;P&gt;&lt;P&gt;&lt;a href="#top"&gt;Top&lt;/a&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19570452-113372263415981797?l=salug-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://salug-mobile.blogspot.com/feeds/113372263415981797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19570452&amp;postID=113372263415981797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113372263415981797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113372263415981797'/><link rel='alternate' type='text/html' href='http://salug-mobile.blogspot.com/2005/12/getting-into-awkward-situations_04.html' title='Getting into &lt;I&gt;AWK&lt;/I&gt;ward situations'/><author><name>The Redactor</name><uri>http://www.blogger.com/profile/13710866187777119879</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.netsteele.com/~steelmi1/images/dalek1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19570452.post-113371769776667851</id><published>2005-12-04T11:34:00.000-06:00</published><updated>2005-12-04T11:34:57.783-06:00</updated><title type='text'>Test posting for SALUG weblog</title><content type='html'>This is a test&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19570452-113371769776667851?l=salug-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://salug-mobile.blogspot.com/feeds/113371769776667851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19570452&amp;postID=113371769776667851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113371769776667851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19570452/posts/default/113371769776667851'/><link rel='alternate' type='text/html' href='http://salug-mobile.blogspot.com/2005/12/test-posting-for-salug-weblog.html' title='Test posting for SALUG weblog'/><author><name>The Redactor</name><uri>http://www.blogger.com/profile/13710866187777119879</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.netsteele.com/~steelmi1/images/dalek1.jpg'/></author><thr:total>0</thr:total></entry></feed>
