<?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/'><id>tag:blogger.com,1999:blog-3822757291061444396.post4235657609533053338..comments</id><updated>2010-08-27T09:05:27.044-05:00</updated><category term='manpages'/><category term='arm'/><category term='pairprogramming'/><category term='gpg'/><category term='DevOps'/><category term='apply-patch'/><category term='kenburns'/><category term='Eucalyptus'/><category term='Membership'/><category term='Byobu'/><category term='Solar'/><category term='udw'/><category term='extremeprogramming'/><category term='ubuntu-allstars'/><category term='LWN'/><category term='ReleaseParty'/><category term='Green-Computing'/><category term='Landscape'/><category term='bazaar'/><category term='ecryptfs'/><category term='encryption'/><category term='Community'/><category term='BSG'/><category term='cr-gpg'/><category term='Asus'/><category term='txlf'/><category term='Travel'/><category term='Screen-Profiles'/><category term='acta'/><category term='dpkg'/><category term='Ubuntu-Server'/><category term='video'/><category term='Libvirt'/><category term='dotdee'/><category term='QEMU'/><category term='gazzangbang'/><category term='cloud-live'/><category term='launchpad'/><category term='Turnkey'/><category term='aws'/><category term='EC2'/><category term='blindcafe'/><category term='bug-zapping'/><category term='maddog'/><category term='keep-one-running'/><category term='VMWare'/><category term='Running'/><category term='MythTV'/><category term='Testdrive'/><category term='Hacks'/><category term='Images'/><category term='security'/><category term='Screen'/><category term='Phones'/><category term='aurora'/><category term='Gorilla'/><category term='sopa'/><category term='puppet'/><category term='Smplayer'/><category term='LTS4'/><category term='CloudFoundry'/><category term='orchestra'/><category term='run-one'/><category term='G1'/><category term='Canonical'/><category term='Sound'/><category term='pirate'/><category term='UEC'/><category term='Intel'/><category term='conferences'/><category term='dmr'/><category term='UDS'/><category term='virt-manager'/><category term='Netflix'/><category term='RHEL'/><category term='Lost'/><category term='ensemble'/><category term='tmux'/><category term='Ubuntu-Desktop'/><category term='Austin'/><category term='Alfresco'/><category term='PowerNap'/><category term='uquick'/><category term='Roomba'/><category term='TAMU'/><category term='Scotland'/><category term='Daemon'/><category term='it'/><category term='LinuxCon'/><category term='Patriot'/><category term='mcollective'/><category term='aubergine'/><category term='KVM'/><category term='Ubuntu-HA'/><category term='Parable'/><category term='agile'/><category term='gazzang'/><category term='ChromeOS'/><category term='Bikeshed'/><category term='amazon'/><category term='animation'/><category term='Conference'/><category term='Virtualization'/><category term='Android'/><category term='pvoutput'/><category term='Siteam'/><category term='Cloud'/><category term='LCA2010'/><category term='keymon'/><category term='gnupg'/><category term='LTS'/><category term='Reviews'/><category term='musica'/><category term='Go'/><category term='bip'/><category term='openstack'/><category term='PalmPre'/><category term='Approx'/><category term='scale'/><category term='juju'/><category term='Debian'/><category term='bootmail'/><category term='ssh'/><category term='uinstall'/><category term='Virt'/><category term='font'/><category term='Pictor'/><category term='Featured'/><category term='Audacity'/><category term='update-motd'/><category term='dennisritchie'/><category term='ubuntu-cloud'/><category term='unix'/><category term='rootsign'/><category term='WebOS'/><category term='QEMU-KVM'/><category term='SSD'/><category term='ubuntu-sever'/><category term='Classroom'/><category term='chromium'/><category term='Ubuntu'/><category term='TLF'/><category term='NewZealand'/><category term='Hiking'/><category term='ssh-import-id'/><category term='Dosbox'/><title type='text'>Comments on From the Canyon Edge - :-Dustin Kirkland: Buy 1, get 8 Free!  Or, a Useful Awk Hack...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.dustinkirkland.com/feeds/4235657609533053338/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default'/><link rel='alternate' type='text/html' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html'/><author><name>Dustin Kirkland</name><uri>http://www.blogger.com/profile/12464590128908584782</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-8f3f3546bFQ/TtxDbdiq8-I/AAAAAAAAEo4/uuzgJfIpvo4/s220/kirkland_192.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3822757291061444396.post-1319656008887322219</id><published>2010-08-27T09:05:27.044-05:00</published><updated>2010-08-27T09:05:27.044-05:00</updated><title type='text'>&amp;quot;When systems programming, do you ever find y...</title><content type='html'>&amp;quot;When systems programming, do you ever find yourself with an unfamiliar error code, and then you&amp;#39;re off Googling what the heck it actually means?&amp;quot;&lt;br /&gt;&lt;br /&gt;Never. I read the manuals of the functions I use and account for the errors that might occur. It shouldn&amp;#39;t happen that you find yourself with the actual _number_ of the error code. You should rather print a/the message associated with the error as it is handled in your program. Like... right? I mean, am I alone in this methodology?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/1319656008887322219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/1319656008887322219'/><link rel='alternate' type='text/html' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html?showComment=1282917927044#c1319656008887322219' title=''/><author><name>zaman</name><uri>http://zaman.myopenid.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html' ref='tag:blogger.com,1999:blog-3822757291061444396.post-4235657609533053338' source='http://www.blogger.com/feeds/3822757291061444396/posts/default/4235657609533053338' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-521531721'/></entry><entry><id>tag:blogger.com,1999:blog-3822757291061444396.post-6765096697655977246</id><published>2010-08-27T04:25:23.958-05:00</published><updated>2010-08-27T04:25:23.958-05:00</updated><title type='text'>and, accusing people of attempting to help you get...</title><content type='html'>and, accusing people of attempting to help you get your tool placed into the most appropriate place (it&amp;#39;s certainly /not/ an Ubuntu development tool) of bikeshedding is a great way to demotivate them. Nice one.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/6765096697655977246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/6765096697655977246'/><link rel='alternate' type='text/html' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html?showComment=1282901123958#c6765096697655977246' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html' ref='tag:blogger.com,1999:blog-3822757291061444396.post-4235657609533053338' source='http://www.blogger.com/feeds/3822757291061444396/posts/default/4235657609533053338' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1069361792'/></entry><entry><id>tag:blogger.com,1999:blog-3822757291061444396.post-2369629808483127813</id><published>2010-08-27T04:22:03.736-05:00</published><updated>2010-08-27T04:22:03.736-05:00</updated><title type='text'>You really shouldn&amp;#39;t use such generic names; i...</title><content type='html'>You really shouldn&amp;#39;t use such generic names; it&amp;#39;s probably best to namespace them instead: $namespace-1..9. Otherwise, that&amp;#39;s a good idea.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/2369629808483127813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/2369629808483127813'/><link rel='alternate' type='text/html' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html?showComment=1282900923736#c2369629808483127813' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html' ref='tag:blogger.com,1999:blog-3822757291061444396.post-4235657609533053338' source='http://www.blogger.com/feeds/3822757291061444396/posts/default/4235657609533053338' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1069361792'/></entry><entry><id>tag:blogger.com,1999:blog-3822757291061444396.post-6286293627123270034</id><published>2010-08-26T22:27:19.866-05:00</published><updated>2010-08-26T22:27:19.866-05:00</updated><title type='text'>In general, its a good idea to avoid eval.  Below ...</title><content type='html'>In general, its a good idea to avoid eval.  Below is a solution without eval.  Before you get on my case and tell me that &amp;#39;${2:+}&amp;#39; didn&amp;#39;t work in some ancient versions of /bin/sh, i don&amp;#39;t really care.  If you do, change it to /bin/bash.&lt;br /&gt;&lt;br /&gt;Second thing i like is it doesn&amp;#39;t rely on being named something specific. &amp;#39;fno&amp;#39; or &amp;#39;field number&amp;#39; requires input of a field.  you can then easily set up aliases to pass it that field, as shown below.&lt;br /&gt;&lt;br /&gt;$ cat ~/bin/fno &lt;br /&gt;#!/bin/sh&lt;br /&gt;# arg1=field number # arg2 = optional field separator&lt;br /&gt;[ -n &amp;quot;${1}&amp;quot; -a &amp;quot;${1#[0-9]}&amp;quot; != &amp;quot;${1}&amp;quot; ] ||&lt;br /&gt;   { echo &amp;quot;bad input to ${0##*/}: $*&amp;quot; 1&amp;gt;&amp;amp;2; exit 1; }&lt;br /&gt;exec awk ${2:+&amp;quot;-F${2}&amp;quot;} &amp;#39;{print $&amp;#39;&amp;quot;$1&amp;quot;&amp;#39;}&amp;#39;&lt;br /&gt;&lt;br /&gt;$ for x in $(seq 1 9); do alias $x=&amp;quot;fno $x&amp;quot;; done&lt;br /&gt;$ echo &amp;quot;one two three four five&amp;quot; | fno 5&lt;br /&gt;five&lt;br /&gt;$ echo &amp;quot;one two three four five&amp;quot; | 4&lt;br /&gt;four&lt;br /&gt;$ echo &amp;quot;one:two:three:four:five&amp;quot; | 2&lt;br /&gt;&lt;br /&gt;$ echo &amp;quot;one:two:three:four:five&amp;quot; | 2 :&lt;br /&gt;two</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/6286293627123270034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/6286293627123270034'/><link rel='alternate' type='text/html' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html?showComment=1282879639866#c6286293627123270034' title=''/><author><name>smoser</name><uri>https://launchpad.net/~smoser</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html' ref='tag:blogger.com,1999:blog-3822757291061444396.post-4235657609533053338' source='http://www.blogger.com/feeds/3822757291061444396/posts/default/4235657609533053338' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1914952706'/></entry><entry><id>tag:blogger.com,1999:blog-3822757291061444396.post-8705312535254515954</id><published>2010-08-26T21:10:08.899-05:00</published><updated>2010-08-26T21:10:08.899-05:00</updated><title type='text'>Evil how?  Did you try it?</title><content type='html'>Evil how?  Did you try it?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/8705312535254515954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/8705312535254515954'/><link rel='alternate' type='text/html' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html?showComment=1282875008899#c8705312535254515954' title=''/><author><name>Dustin Kirkland</name><uri>http://www.blogger.com/profile/12464590128908584782</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02356398126832097517'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-mej0A6dVeU/SPOZPBFjDyI/AAAAAAAAAHM/Pr2iOE99jgQ/S220/kirkland.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html' ref='tag:blogger.com,1999:blog-3822757291061444396.post-4235657609533053338' source='http://www.blogger.com/feeds/3822757291061444396/posts/default/4235657609533053338' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1337200100'/></entry><entry><id>tag:blogger.com,1999:blog-3822757291061444396.post-660910727909665945</id><published>2010-08-26T21:03:30.399-05:00</published><updated>2010-08-26T21:03:30.399-05:00</updated><title type='text'>This looks evil.. glad you aptly labeled it as a &amp;...</title><content type='html'>This looks evil.. glad you aptly labeled it as a &amp;quot;hack&amp;quot; :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/660910727909665945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3822757291061444396/4235657609533053338/comments/default/660910727909665945'/><link rel='alternate' type='text/html' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html?showComment=1282874610399#c660910727909665945' title=''/><author><name>tim</name><uri>http://www.blogger.com/profile/11837206199805463418</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_63S3dw-HviI/TG3w2ZR2uxI/AAAAAAAAAAM/MWDtuOcwU9A/S220/tim.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dustinkirkland.com/2010/08/buy-1-get-8-free-or-useful-awk-hack.html' ref='tag:blogger.com,1999:blog-3822757291061444396.post-4235657609533053338' source='http://www.blogger.com/feeds/3822757291061444396/posts/default/4235657609533053338' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-841525595'/></entry></feed>
