<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/bash/tags/awk</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sat, 25 May 2013 04:30:53 GMT</pubDate>
<item>
<title>(Bash) Find a pattern on a code base and show a pretty resultset - ferro</title>
<link>http://snipplr.com/view/62824/find-a-pattern-on-a-code-base-and-show-a-pretty-resultset/</link>
<description><![CDATA[ <p>trims spaces from the source code and left align the code column</p> ]]></description>
<pubDate>Sat, 28 Jan 2012 00:05:54 GMT</pubDate>
<guid>http://snipplr.com/view/62824/find-a-pattern-on-a-code-base-and-show-a-pretty-resultset/</guid>
</item>
<item>
<title>(Bash) Sed and Awk CSV Address Prep - johnattebury</title>
<link>http://snipplr.com/view/55772/sed-and-awk-csv-address-prep/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 27 Jun 2011 16:23:54 GMT</pubDate>
<guid>http://snipplr.com/view/55772/sed-and-awk-csv-address-prep/</guid>
</item>
<item>
<title>(Bash) HTML Table to CSV in AWK [awk] - bubnoff</title>
<link>http://snipplr.com/view/52126/html-table-to-csv-in-awk-awk/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 15 Apr 2011 12:30:03 GMT</pubDate>
<guid>http://snipplr.com/view/52126/html-table-to-csv-in-awk-awk/</guid>
</item>
<item>
<title>(Bash) Convert all Illumina qseq.txt files into fastq files, organized by lane - cataglyphis</title>
<link>http://snipplr.com/view/48127/convert-all-illumina-qseqtxt-files-into-fastq-files-organized-by-lane/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 31 Jan 2011 11:15:19 GMT</pubDate>
<guid>http://snipplr.com/view/48127/convert-all-illumina-qseqtxt-files-into-fastq-files-organized-by-lane/</guid>
</item>
<item>
<title>(Bash) Count Word Frequency in a File (bash4, awk) - tm</title>
<link>http://snipplr.com/view/35454/count-word-frequency-in-a-file-bash4-awk/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 02 Jun 2010 18:38:10 GMT</pubDate>
<guid>http://snipplr.com/view/35454/count-word-frequency-in-a-file-bash4-awk/</guid>
</item>
<item>
<title>(Bash) Filter a CSV file, eliminating some rows and columns - afiedler8</title>
<link>http://snipplr.com/view/29211/filter-a-csv-file-eliminating-some-rows-and-columns/</link>
<description><![CDATA[ <p>This filters a csv file, printing out the first, second, fifth, and seventh column only when the third column is "USD/JPY" and the fourth is "Q". Note this is awk, but there wasn't a selection for it.</p> ]]></description>
<pubDate>Wed, 03 Mar 2010 10:27:10 GMT</pubDate>
<guid>http://snipplr.com/view/29211/filter-a-csv-file-eliminating-some-rows-and-columns/</guid>
</item>
<item>
<title>(Bash) SHELL SCRIPT PARSING LOGFILE - lfatr</title>
<link>http://snipplr.com/view/28387/shell-script-parsing-logfile/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 16 Feb 2010 11:10:31 GMT</pubDate>
<guid>http://snipplr.com/view/28387/shell-script-parsing-logfile/</guid>
</item>
<item>
<title>(Bash) output test file for wget entries - rowntreerob</title>
<link>http://snipplr.com/view/19928/output-test-file-for-wget-entries/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 18 Sep 2009 18:07:42 GMT</pubDate>
<guid>http://snipplr.com/view/19928/output-test-file-for-wget-entries/</guid>
</item>
<item>
<title>(Bash) Kill Process with Perl Regular Expression - wearetherock</title>
<link>http://snipplr.com/view/19670/kill-process-with-perl-regular-expression/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 14 Sep 2009 02:34:35 GMT</pubDate>
<guid>http://snipplr.com/view/19670/kill-process-with-perl-regular-expression/</guid>
</item>
<item>
<title>(Bash) Awk Script to count # of occurences of fields in a file - webapplications</title>
<link>http://snipplr.com/view/16533/awk-script-to-count--of-occurences-of-fields-in-a-file/</link>
<description><![CDATA[ <p>Use to quickly list  the unique fields in a file AND the number of times the field occurs   
e.g. Count how times a resource (eg image) has been resulted in a 404 status by examining the IIS logs.

eg assuming this is the input file: **input.txt** and the source script below is in **count.awk**  

2009-06-26 GET /presources/ebooks/images/step3.gif 404  
2009-06-26 GET /images/20090000/20094617.gif 404  
2009-06-26 GET /presources/ebooks/images/digital_rarrow.gif 404  
2009-06-26 GET /images/19480000/19482901.gif 404  
2009-06-26 GET /images/33110000/33111321.gif 404  
2009-06-26 GET /presources/ebooks/images/step3.gif 404  
2009-06-26 GET /presources/ebooks/images/step1.gif 404  
2009-06-26 GET /presources/ebooks/images/step3.gif 404  
2009-06-26 GET /images/20090000/20094487.gif 404  
2009-06-26 GET /presources/ebooks/images/step1.gif 404  

executing   

     awk -f count.awk input.txt 

will yield  

1 /images/33110000/33111321.gif   
2 /presources/ebooks/images/step1.gif   
3 /presources/ebooks/images/step3.gif  
1 /presources/ebooks/images/digital_rarrow.gif  
1 /images/20090000/20094487.gif  
1 /images/19480000/19482901.gif  
1 /images/20090000/20094617.gif</p> ]]></description>
<pubDate>Wed, 01 Jul 2009 01:37:23 GMT</pubDate>
<guid>http://snipplr.com/view/16533/awk-script-to-count--of-occurences-of-fields-in-a-file/</guid>
</item>
<item>
<title>(Bash) Find Latest file in a directory - jaduks</title>
<link>http://snipplr.com/view/10845/find-latest-file-in-a-directory/</link>
<description><![CDATA[ <p>To find the latest file in a particular dir</p> ]]></description>
<pubDate>Sat, 03 Jan 2009 09:25:42 GMT</pubDate>
<guid>http://snipplr.com/view/10845/find-latest-file-in-a-directory/</guid>
</item>
<item>
<title>(Bash) Compute Directory Size Recursively with du - ches</title>
<link>http://snipplr.com/view/7566/compute-directory-size-recursively-with-du/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 28 Jul 2008 18:04:06 GMT</pubDate>
<guid>http://snipplr.com/view/7566/compute-directory-size-recursively-with-du/</guid>
</item>
<item>
<title>(Bash) Deleting a file which is listed in svn status - narkisr</title>
<link>http://snipplr.com/view/7410/deleting-a-file-which-is-listed-in-svn-status/</link>
<description><![CDATA[ <p>A useful AWK one liner, see http://student.northpark.edu/pemente/awk/awk1line.txt for some more</p> ]]></description>
<pubDate>Sun, 20 Jul 2008 08:11:48 GMT</pubDate>
<guid>http://snipplr.com/view/7410/deleting-a-file-which-is-listed-in-svn-status/</guid>
</item>
<item>
<title>(Bash) Awk examples - Juanje</title>
<link>http://snipplr.com/view/6510/awk-examples/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 30 May 2008 19:33:08 GMT</pubDate>
<guid>http://snipplr.com/view/6510/awk-examples/</guid>
</item>
<item>
<title>(Bash) Get (just) the IP address in Linux - Juanje</title>
<link>http://snipplr.com/view/6154/get-just-the-ip-address-in-linux/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 08 May 2008 20:41:07 GMT</pubDate>
<guid>http://snipplr.com/view/6154/get-just-the-ip-address-in-linux/</guid>
</item>
<item>
<title>(Bash) List commands in history, sorted by usage - noah</title>
<link>http://snipplr.com/view/6135/list-commands-in-history-sorted-by-usage/</link>
<description><![CDATA[ <p>Lists the top 10 commands in your history file.

Thanks Ben!

Here's an example session:

    May12 10:39:18 book> ~/Documents/n_s/tools/command-history.sh
    162 quite
    110 svn
    107 ruby
    61 curl
    39 rwget
    34 grep
    33 cd
    21 lwp-request
    19 fg
    17 ls</p> ]]></description>
<pubDate>Tue, 06 May 2008 15:24:05 GMT</pubDate>
<guid>http://snipplr.com/view/6135/list-commands-in-history-sorted-by-usage/</guid>
</item>
<item>
<title>(Bash) Determine which number out of a list is being processed at the moment - wolfie</title>
<link>http://snipplr.com/view/6130/determine-which-number-out-of-a-list-is-being-processed-at-the-moment/</link>
<description><![CDATA[ <p>Useful if you have a shell script running lots of the same command and want to know how many of them have been done</p> ]]></description>
<pubDate>Tue, 06 May 2008 06:22:05 GMT</pubDate>
<guid>http://snipplr.com/view/6130/determine-which-number-out-of-a-list-is-being-processed-at-the-moment/</guid>
</item>
<item>
<title>(Bash) Remove all tables with a certain pattern from the database - berkes</title>
<link>http://snipplr.com/view/4890/remove-all-tables-with-a-certain-pattern-from-the-database/</link>
<description><![CDATA[ <p>This script removes (DROPS) all tables that start with foo_. Usefull if you had some CMS or application that (ab)uses table prefixing, and want to clean 0ut your database.

NOTE: the data is remove FOREVER! So take good casre: make backups and all the likes. Try on a test-database first!</p> ]]></description>
<pubDate>Mon, 04 Feb 2008 04:18:22 GMT</pubDate>
<guid>http://snipplr.com/view/4890/remove-all-tables-with-a-certain-pattern-from-the-database/</guid>
</item>
<item>
<title>(Bash) Deleting Blank Lines Using AWK - ches</title>
<link>http://snipplr.com/view/4315/deleting-blank-lines-using-awk/</link>
<description><![CDATA[ <p>Create a copy of a text file with blank lines removed.</p> ]]></description>
<pubDate>Wed, 12 Dec 2007 12:38:18 GMT</pubDate>
<guid>http://snipplr.com/view/4315/deleting-blank-lines-using-awk/</guid>
</item>
<item>
<title>(Bash) Batch File Rename with awk and sed - ches</title>
<link>http://snipplr.com/view/3648/batch-file-rename-with-awk-and-sed/</link>
<description><![CDATA[ <p>Leave off the final pipe to /bin/sh to do a 'dry run'</p> ]]></description>
<pubDate>Fri, 07 Sep 2007 14:58:16 GMT</pubDate>
<guid>http://snipplr.com/view/3648/batch-file-rename-with-awk-and-sed/</guid>
</item>
</channel>
</rss>