<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Shell Script on Amit Agarwal Linux Blog</title>
    <link>/tags/shell-script/</link>
    <description>Recent content in Shell Script on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 25 Dec 2017 01:00:07 +0000</lastBuildDate>
    
	<atom:link href="/tags/shell-script/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>send mail using telnet from script</title>
      <link>/2017/12/25/send-mail-telnet-script/</link>
      <pubDate>Mon, 25 Dec 2017 01:00:07 +0000</pubDate>
      
      <guid>/2017/12/25/send-mail-telnet-script/</guid>
      <description>&lt;p&gt;If you have no other option but to use telnet with authentication to send mail 🙂&lt;/p&gt;
&lt;pre class=&#34;brush:bash&#34;&gt;( echo &#34;ehlo&#34;
sleep 1
auth login
sleep 1
$(echo username |base64)
sleep 1
$(echo password |base64)
sleep 1
mail from: from-address
sleep 1
rcpt to: recepient
sleep 1
data
sleep 1
subject: test 
test mail
. 

exit ) |telnet server port

&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>change the output format for time command</title>
      <link>/2016/08/16/change-output-format-time-command/</link>
      <pubDate>Tue, 16 Aug 2016 01:22:52 +0000</pubDate>
      
      <guid>/2016/08/16/change-output-format-time-command/</guid>
      <description>&lt;p&gt;If you are doing some scripting and using ‘time’ command, then you know sometimes it becomes difficult to capture the output as the output would be something like this:&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;: amit ; time ls

real    0m0.002s
user    0m0.000s
sys 0m0.001s
&lt;/pre&gt;
&lt;p&gt;So, it is better to change that format. Here is simple example:&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      &amp;amp;nbsp;
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;dl&gt;
&lt;dt&gt;TIMEFORMAT=’real %3R user %3U sys %3S pcpu %P’ time ls&lt;/dt&gt;
&lt;dd&gt;amit ;  TIMEFORMAT=’real %3R user %3U sys %3S pcpu %P’ time ls&lt;/dd&gt;
&lt;dt&gt;0.00user 0.00system 0:00.00elapsed 0%CPU (0text+0data 2432max)&lt;/dt&gt;
&lt;dt&gt;0inputs+0outputs (0major+109minor)pagefaults 0swaps&lt;/dt&gt;
&lt;dd&gt;amit ; TIMEFORMAT=’real %3R user %3U sys %3S’&lt;/dd&gt;
&lt;dd&gt;amit ; time ls&lt;br&gt;
real 0.001 user 0.001 sys 0.000&lt;/dd&gt;
&lt;dd&gt;amit ;&lt;/dd&gt;
&lt;dd&gt;amit ; TIMEFORMAT=’TIMEOUTPUT = real %3R user %3U sys %3S’&lt;/dd&gt;
&lt;dd&gt;amit ; time ls&lt;br&gt;
TIMEOUTPUT = real 0.001 user 0.001 sys 0.000&lt;/dd&gt;
&lt;dd&gt;amit ;&lt;/dd&gt;
&lt;/dl&gt;</description>
    </item>
    
    <item>
      <title>bash refer parameters from the current command</title>
      <link>/2014/09/15/bash-refer-parameters-current-command/</link>
      <pubDate>Mon, 15 Sep 2014 00:40:22 +0000</pubDate>
      
      <guid>/2014/09/15/bash-refer-parameters-current-command/</guid>
      <description>&lt;p&gt;In bash you can use&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;!#&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;to refer to any parameter from the current command, example:&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;mv ak amit.!#:1.txt
ls amit.ak.txt&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>Home grown mail scheduler with bash script and cron</title>
      <link>/2013/10/04/home-grown-mail-scheduler-bash-script-cron/</link>
      <pubDate>Fri, 04 Oct 2013 01:04:35 +0000</pubDate>
      
      <guid>/2013/10/04/home-grown-mail-scheduler-bash-script-cron/</guid>
      <description>&lt;p&gt;If you are using &lt;a class=&#34;zem_slink&#34; title=&#34;Linux Boot Camp&#34; href=&#34;http://www.intenseschool.com/boot_camp/linux&#34; target=&#34;_blank&#34; rel=&#34;intenseschool&#34;&gt;Linux&lt;/a&gt; (Fedora/Ubuntu or anything else) then you do get a lot of tools and one of them is &lt;a class=&#34;zem_slink&#34; title=&#34;Cron&#34; href=&#34;http://en.wikipedia.org/wiki/Cron&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;cron&lt;/a&gt;. Very very useful. Just write some &lt;a class=&#34;zem_slink&#34; title=&#34;Shell script&#34; href=&#34;http://en.wikipedia.org/wiki/Shell_script&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;script&lt;/a&gt; that can do the task for you, put it in cron and forget it. So, here is a home grown way to schedule mails.&lt;/p&gt;
&lt;p&gt;First, copy this script below:&lt;/p&gt;
&lt;pre class=&#34;brush: actionscript3; gutter: true; first-line: 1&#34;&gt;#!/bin/bash -
#============================================================================&lt;a class=&#34;zem_slink&#34; title=&#34;Relational operator&#34; href=&#34;http://en.wikipedia.org/wiki/Relational_operator&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;===&lt;/a&gt;
#
#          FILE: sched_mail.sh
#
#         USAGE: ./sched_mail.sh
#
#   DESCRIPTION:
#
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Amit Agarwal (aka), 
#      REVISION:  ---
#===============================================================================

mailfile=&#34;~/mail&#34;
if [[ $(wc -l $mailfile|awk &#39;{print $1}&#39; ) -ge 5 ]]
then
    to=$(grep ^To: $mailfile|sed &#39;s/To: //&#39;)
    echo &#34;Good to send mail... to = $to&#34;
    sendmail -t &amp;lt;$mailfile
    echo &#34;once mail is send, delete the contents of file&#34;
    echo &#34;sed -i &#39;4,$ d&#39; $mailfile&#34;
fi&lt;/pre&gt;
&lt;p&gt;Now, create a file called mail in your &lt;a class=&#34;zem_slink&#34; title=&#34;Home directory&#34; href=&#34;http://en.wikipedia.org/wiki/Home_directory&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;home directory&lt;/a&gt;, with the following contents:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Delete all but some directories</title>
      <link>/2013/08/16/delete-directories/</link>
      <pubDate>Fri, 16 Aug 2013 01:06:05 +0000</pubDate>
      
      <guid>/2013/08/16/delete-directories/</guid>
      <description>&lt;p&gt;I think, like me, you would have faced a lot of situations, where you wanted to delete all the files or directories in a location, leaving only the required files/directories. So, I have a directory containing lots of files/directories and I want to delete most of them except some 5/10 of them, how to I do it.&lt;/p&gt;
&lt;p&gt;I finally wrote a small &lt;a class=&#34;zem_slink&#34; title=&#34;Shell script&#34; href=&#34;http://en.wikipedia.org/wiki/Shell_script&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;script&lt;/a&gt; to do that. First save list of files that you do not want to delete in file called “listnames” and then &lt;a class=&#34;zem_slink&#34; title=&#34;Capital punishment&#34; href=&#34;http://en.wikipedia.org/wiki/Capital_punishment&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;execute&lt;/a&gt; the below script. This will give you the rm commands that you need to execute. If you want you can execute the rm command from the script, but to be able to review, I just have the commands echoed.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>convert tabs to spaces, the easy way</title>
      <link>/2013/07/08/convert-tabs-spaces-easy/</link>
      <pubDate>Mon, 08 Jul 2013 01:32:03 +0000</pubDate>
      
      <guid>/2013/07/08/convert-tabs-spaces-easy/</guid>
      <description>&lt;p&gt;Lots of times you want to convert tabs to spaces and sometimes from a &lt;a class=&#34;zem_slink&#34; title=&#34;Shell script&#34; href=&#34;http://en.wikipedia.org/wiki/Shell_script&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;shell script&lt;/a&gt;, if that is the case, then simple solution is “&lt;strong&gt;tidy&lt;/strong&gt;“. First you need to install tidy as follows:&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;sudo yum install tidy&lt;/pre&gt;
&lt;p&gt;and then you can use the command tab2space.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;tab2spcae&lt;/pre&gt;
&lt;p&gt;This will print the output to &lt;a class=&#34;zem_slink&#34; title=&#34;Standard streams&#34; href=&#34;http://en.wikipedia.org/wiki/Standard_streams&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;STDOUT&lt;/a&gt; by default which you can redirect if you want.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>quick bash script for datewise backup of directory</title>
      <link>/2012/12/12/quick-bash-script-datewise-backup-directory/</link>
      <pubDate>Wed, 12 Dec 2012 00:50:29 +0000</pubDate>
      
      <guid>/2012/12/12/quick-bash-script-datewise-backup-directory/</guid>
      <description>&lt;p&gt;I was working on something and the data was very critical and needed &lt;a class=&#34;zem_slink&#34; title=&#34;data backup management&#34; href=&#34;http://www.symantec.com/opscenter-analytics&#34; rel=&#34;symantec&#34; target=&#34;_blank&#34;&gt;backup&lt;/a&gt;. I wrote a &lt;a class=&#34;zem_slink&#34; title=&#34;Bash (Unix shell)&#34; href=&#34;http://www.gnu.org/software/bash/&#34; rel=&#34;homepage&#34; target=&#34;_blank&#34;&gt;bash script&lt;/a&gt; to back up the data every 5 hours with cron and bash script. Thought I will share that with you. Here is the script.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;#!/bin/bash - 
#===============================================================================
#
#          FILE:  backup.sh
# 
#         USAGE:  ./backup.sh 
# 
#   DESCRIPTION:  Backup all the current files.
# 
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: Amit Agarwal (aka), amit.agarwal@roamware.com
#       COMPANY: Roamware India Pvt Ltd
#       CREATED: 08/19/2011 02:43:32 PM IST
#      REVISION:  ---
#===============================================================================
backupf=( a b c d) #Here you need to specify the directory you need to backup.
bkupdir=&#34;/tmp/backup/$(date +%Y)/$(date +%m)/$(date +%d)&#34; #Here you can change the basedir for the backups
mkdir  -p $bkupdir
sudo tar cvfz $bkupdir/bkup_$(date &#34;+%Y%m%d_%H%M&#34;).tgz $backupf[*] #Remove sudo if you do not need it.
echo &#34;Backup created in dir $dir&#34;&lt;/pre&gt;
&lt;p&gt;And then just add it to cron as “00 */5 * * * /home//bin/backup.sh”. Change the path if it does not match what is given here.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>15 Linux Bash History Expansion Examples You Should Know</title>
      <link>/2012/03/02/15-linux-bash-history-expansion-examples/</link>
      <pubDate>Fri, 02 Mar 2012 11:41:20 +0000</pubDate>
      
      <guid>/2012/03/02/15-linux-bash-history-expansion-examples/</guid>
      <description>&lt;figure style=&#34;width: 300px&#34; class=&#34;wp-caption alignright&#34;&gt;&lt;a href=&#34;http://commons.wikipedia.org/wiki/File:Bash_screenshot.png&#34; target=&#34;_blank&#34;&gt;&lt;img class=&#34;zemanta-img-inserted zemanta-img-configured&#34; title=&#34;Screenshot of a sample Bash session, taken on ...&#34; src=&#34;http://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Bash_screenshot.png/300px-Bash_screenshot.png&#34; alt=&#34;Screenshot of a sample Bash session, taken on ...&#34; width=&#34;300&#34; height=&#34;408&#34; /&gt;&lt;/a&gt;&lt;figcaption class=&#34;wp-caption-text&#34;&gt;Image via Wikipedia&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Here is a nice &lt;a href=&#34;http://www.thegeekstuff.com/2011/08/bash-history-expansion/&#34; target=&#34;_blank&#34;&gt;link&lt;/a&gt; on BASH History Expansion. There are lot of examples in this page and some of them might be quite useful. But here are my list of favourites:&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;!!&lt;/pre&gt;
&lt;p&gt;This is probably the most used one by me. This will repeat the last command. And this works even in conjunction with other commands like&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Unix shell script for removing duplicate files</title>
      <link>/2011/05/16/unix-shell-script-removing-duplicate-files/</link>
      <pubDate>Mon, 16 May 2011 14:07:33 +0000</pubDate>
      
      <guid>/2011/05/16/unix-shell-script-removing-duplicate-files/</guid>
      <description>&lt;p&gt;The following &lt;a class=&#34;zem_slink&#34; title=&#34;Shell script&#34; href=&#34;http://en.wikipedia.org/wiki/Shell_script&#34; rel=&#34;wikipedia&#34;&gt;shell script&lt;/a&gt; finds duplicate (2 or more identical) files and outputs a new shell script containing &lt;a class=&#34;zem_slink&#34; title=&#34;Comment (computer programming)&#34; href=&#34;http://en.wikipedia.org/wiki/Comment_%28computer_programming%29&#34; rel=&#34;wikipedia&#34;&gt;commented-out&lt;/a&gt; rm statements for deleting them (&lt;a class=&#34;zem_slink&#34; title=&#34;Cut, copy, and paste&#34; href=&#34;http://en.wikipedia.org/wiki/Cut%2C_copy%2C_and_paste&#34; rel=&#34;wikipedia&#34;&gt;copy-paste&lt;/a&gt; from here):&lt;/p&gt;
&lt;p&gt;::: updated on 02 May 20121, seems like wordpress did not like it so well so reformatting the code :::::::&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;#!/bin/bash -
#===============================================================================
#
#          FILE:  a.sh
#
#         USAGE:  ./a.sh
#
#   DESCRIPTION:
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: Amit Agarwal (aka), amit.agarwal@roamware.com
#       COMPANY: blog.amit-agarwal.co.in
#       CREATED: 02/05/12 06:52:08 IST
# Last modified: Wed May 02, 2012  07:03AM
#      REVISION:  ---
#===============================================================================

OUTF=rem-duplicates.sh;
echo &#34;#!/bin/sh&#34; &amp;gt;$OUTF;
find &#34;$@&#34; -type f -exec md5sum {} \; 2&amp;gt;/dev/null | sort --key=1,32 | uniq -w 32 -d |cut -b 1-32 --complement |sed &#39;s/^/rm -f/&#39; &amp;gt;&amp;gt;$OUTF&lt;/pre&gt;
&lt;p&gt;Pretty good one line, I must say 🙂&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Shell Scripting</title>
      <link>/2011/01/05/shell-scripting/</link>
      <pubDate>Wed, 05 Jan 2011 15:08:44 +0000</pubDate>
      
      <guid>/2011/01/05/shell-scripting/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here are some links for bash programming that you may find useful.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://tips-linux.net/en/content/pro-bash-programming&#34;&gt;http://tips-linux.net/en/content/pro-bash-programming&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://tips-linux.net/en/content/expert-shell-scripting&#34;&gt;http://tips-linux.net/en/content/expert-shell-scripting&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://tips-linux.net/en/content/beginning-linux-command-line&#34;&gt;http://tips-linux.net/en/content/beginning-linux-command-line&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://tips-linux.net/en/content/bash-pocket-reference&#34;&gt;http://tips-linux.net/en/content/bash-pocket-reference&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://tips-linux.net/en/content/linux-command-line-and-shell-scripting-bible&#34;&gt;http://tips-linux.net/en/content/linux-command-line-and-shell-scripting-bible&lt;/a&gt;&lt;/p&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.edugeek.net/forums/nix/63944-linux-learning-shell.html&#34;&gt;Linux &amp;#8211; Learning the Shell&lt;/a&gt; (edugeek.net)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://maketecheasier.com/10-useful-tools-websites-tricks-to-master-linux-command/2010/11/09&#34;&gt;10 Useful Tools, Websites And Tricks to Help You Master Linux Command&lt;/a&gt; (maketecheasier.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://blog.yjl.im/2010/12/lf-submitsh-bash-mplayer-lastfm.html&#34;&gt;lf-submit.sh &amp;#8211; Bash mplayer Last.fm scrobbler&lt;/a&gt; (yjl.im)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://blog.interstellr.com/linux-command-line-tricks-you-need-to-know-io&#34;&gt;Linux command line tricks you need to know: IO redirection and piping&lt;/a&gt; (interstellr.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://houcemhachicha.blogspot.com/2010/07/my-top-ten-shellbash-tricks.html&#34;&gt;imabonehead: Houcem HACHICHA&amp;#8217;s Blog: My top ten shell/bash tricks!&lt;/a&gt; (houcemhachicha.blogspot.com)
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;border: medium none; float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;span class=&#34;zem-script more-related pretty-attribution&#34;&gt;&lt;/span&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>mussh - Multihost SSH wrapper</title>
      <link>/2010/05/25/mussh/</link>
      <pubDate>Tue, 25 May 2010 11:33:59 +0000</pubDate>
      
      <guid>/2010/05/25/mussh/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Description:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Mussh is a &amp;lt;a class=&amp;quot;zem_slink freebase/en/shell_script&amp;quot; title=&amp;quot;Shell script&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Shell_script&amp;quot;&amp;gt;shell script&lt;/a&gt; that allows you to execute a command or script over ssh on multiple hosts with one command. When possible mussh will use &amp;lt;a class=&amp;quot;zem_slink freebase/en/ssh-agent&amp;quot; title=&amp;quot;Ssh-agent&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Ssh-agent&amp;quot;&amp;gt;ssh-agent&lt;/a&gt; and RSA/DSA keys to minimize the need to enter your password more than once.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It is a utility for &amp;lt;a class=&amp;quot;zem_slink freebase/en/system_administrator&amp;quot; title=&amp;quot;System administrator&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/System_administrator&amp;quot;&amp;gt;system administrators&lt;/a&gt; maintaining more than one hosts. The utility will help the admin to execute the same command on multiple hosts with a single command.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Awk Introduction Tutorial – 7 Awk Print Examples</title>
      <link>/2010/05/19/awk-introduction-tutorial-%E2%80%93-7-awk-print-examples/</link>
      <pubDate>Wed, 19 May 2010 16:38:43 +0000</pubDate>
      
      <guid>/2010/05/19/awk-introduction-tutorial-%E2%80%93-7-awk-print-examples/</guid>
      <description>&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://www.daylife.com/image/0fNM7HH9s1904?utm_source=zemanta&amp;utm_medium=p&amp;utm_content=0fNM7HH9s1904&amp;utm_campaign=z1\&#34;&gt;&lt;img title=\&#34;LAS VEGAS - JANUARY 23: Dick Robertson, Presi...\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/150x104.jpg\&#34; alt=\&#34;LAS VEGAS - JANUARY 23: Dick Robertson, Presi...\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image by &lt;a href=\&#34;http://www.daylife.com/source/Getty_Images\&#34;&gt;Getty Images&lt;/a&gt; via &lt;a href=\&#34;http://www.daylife.com\&#34;&gt;Daylife&lt;/a&gt;&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;awk examples&lt;/p&gt;
&lt;p&gt;Awk Introduction Tutorial – 7 Awk Print Examples This is the first article on the new awk tutorial series. We’ll be posting several articles on awk in the upcoming weeks that will cover all features of awk with practical examples. In this article, let us review the fundamental awk working methodology along with 7 practical awk print examples. Note: Make sure you review our earlier […]&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Linux Shell Scripting Tutorial – A Beginner\’s handbook</title>
      <link>/2010/04/11/linux-shell-scripting-tutorial-a-beginners-handbook/</link>
      <pubDate>Sun, 11 Apr 2010 09:11:57 +0000</pubDate>
      
      <guid>/2010/04/11/linux-shell-scripting-tutorial-a-beginners-handbook/</guid>
      <description>&lt;div class=\&#34;zemanta-img\&#34;&gt; 
&lt;div&gt;
  &lt;dl class=\&#34;wp-caption alignright\&#34;&gt; &lt;dt class=\&#34;wp-caption-dt\&#34;&gt;&lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Tux.png\&#34;&gt;&lt;img title=\&#34;Tux, the Linux mascot\&#34; src=\&#34;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Tux.png\&#34; alt=\&#34;Tux, the Linux mascot\&#34; /&gt;&lt;/a&gt;&lt;/dt&gt; &lt;dd class=\&#34;wp-caption-dd zemanta-img-attribution\&#34;&gt;Image via &lt;a href=\&#34;http://commons.wikipedia.org/wiki/Image:Tux.png\&#34;&gt;Wikipedia&lt;/a&gt;&lt;/dd&gt; &lt;/dl&gt;
&lt;/div&gt;&lt;/div&gt; 
&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;a class=&amp;quot;zem_slink freebase/en/unix_shell&amp;quot; title=&amp;quot;Unix shell&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Unix_shell&amp;quot;&amp;gt;Linux Shell&lt;/a&gt; Scripting Tutorial – A Beginner&amp;amp;#8217;s handbook —&lt;/p&gt;
&lt;p&gt;This book is for students and Linux System Administrators. It provides the skills to read, write, and debug &amp;lt;a title=&amp;quot;Linux&amp;quot; href=&amp;quot;http://bash.cyberciti.biz/guide/Linux&amp;quot;&amp;gt;Linux&lt;/a&gt; &amp;lt;a class=&amp;quot;zem_slink freebase/en/shell_script&amp;quot; title=&amp;quot;Shell script&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Shell_script&amp;quot;&amp;gt;shell scripts&lt;/a&gt; using &amp;lt;a title=&amp;quot;Bash&amp;quot; href=&amp;quot;http://bash.cyberciti.biz/guide/Bash&amp;quot;&amp;gt;bash&lt;/a&gt; &amp;lt;a title=&amp;quot;Shell&amp;quot; href=&amp;quot;http://bash.cyberciti.biz/guide/Shell&amp;quot;&amp;gt;shell&lt;/a&gt;. The book begins by describing &amp;lt;a title=&amp;quot;Linux&amp;quot; href=&amp;quot;http://bash.cyberciti.biz/guide/Linux&amp;quot;&amp;gt;Linux&lt;/a&gt; and simple scripts to automate frequently executed commands and continues by describing conditional logic, &amp;lt;a class=&amp;quot;zem_slink freebase/en/interactivity&amp;quot; title=&amp;quot;Interactivity&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Interactivity&amp;quot;&amp;gt;user interaction&lt;/a&gt;, loops, menus, traps, and functions. Finally, book covers various sys admin related scripts such as making a backup, using &amp;lt;a class=&amp;quot;zem_slink freebase/guid/9202a8c04000641f80000000045c9c5b&amp;quot; title=&amp;quot;Cron&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Cron&amp;quot;&amp;gt;cron&lt;/a&gt; jobs, writing interactive tools, web based tools, remote login, ftp and database backup related scripts. This book is intended for Linux &amp;lt;a class=&amp;quot;zem_slink freebase/en/system_administrator&amp;quot; title=&amp;quot;System administrator&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/System_administrator&amp;quot;&amp;gt;system administrators&lt;/a&gt; or students who have mastered the basics of a Linux Operating System. You should be able to:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>prepend to a file with sponge from moreutils</title>
      <link>/2010/03/16/prepend-to-a-file-with-sponge-from-moreutils/</link>
      <pubDate>Tue, 16 Mar 2010 02:25:42 +0000</pubDate>
      
      <guid>/2010/03/16/prepend-to-a-file-with-sponge-from-moreutils/</guid>
      <description>&lt;p&gt;&amp;lt;a href=&amp;quot;http://bashcurescancer.com/prepend-to-a-file-with-sponge-from-moreutils.html&amp;quot;&amp;gt;A few weeks I wrote about a tool, which helps you easily prepend to a file. I submitted prepend to moreutils and Joey was kind enough to point out this could be done with `sponge&amp;amp;#8217;.? sponge reads standard input and when done, writes it to a file:&lt;br&gt;
Probably the most general …&lt;/a&gt;&amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot;&amp;gt;Related articles by Zemanta&lt;/h6&gt; &amp;lt;ul class=&amp;quot;zemanta-article-ul&amp;quot;&amp;gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://helpdeskgeek.com/linux-tips/crontab-howto-tutorial-syntax/&amp;quot;&amp;gt;Automating Tasks in Linux Using Crontab&lt;/a&gt; (helpdeskgeek.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.slideshare.net/progrium/sxsw-evented-web&amp;quot;&amp;gt;How WebHooks Will Make Us All Programmers&lt;/a&gt; (slideshare.net)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://almirkaric.com/2010/01/07/debugging-python-multiprocessing/&amp;quot;&amp;gt;Debugging python (multi)processing&lt;/a&gt; (almirkaric.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.slideshare.net/royzimmer/you-can-do-it-start-using-perl-to-handle-your-voyager-needs&amp;quot;&amp;gt;You Can Do It! Start Using Perl to Handle Your Voyager Needs&lt;/a&gt; (slideshare.net)&lt;/li&gt; &lt;/ul&gt; &amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;zemanta-pixie-a&amp;quot; title=&amp;quot;Reblog this post [with Zemanta]&amp;quot; href=&amp;quot;http://reblog.zemanta.com/zemified/b2b2afad-1679-46ab-831c-90ae0cc4d30f/&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b14.png&amp;quot; alt=&amp;quot;Reblog this post [with Zemanta]&amp;quot; /&amp;gt;&lt;/a&gt;&amp;lt;span class=&amp;quot;zem-script more-related more-info pretty-attribution paragraph-reblog&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
