<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for *nix Shell</title>
	<atom:link href="http://nixshell.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://nixshell.wordpress.com</link>
	<description>UNIX / Linux Shell Hints and Tips&#160;&#160;&#160;&#160;&#160;&#160;(a http://steve-parker.org/sh/sh.shtml subproject)</description>
	<lastBuildDate>Sun, 31 Mar 2013 18:54:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on Simple Maths in the Unix Shell by unixshell</title>
		<link>http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5946</link>
		<dc:creator><![CDATA[unixshell]]></dc:creator>
		<pubDate>Sun, 31 Mar 2013 18:54:44 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5946</guid>
		<description><![CDATA[Oh - and it&#039;s the same backtick at both sides:
x=`expr 20 + 30`
rather than
x=&#039;expr 20 + 30`]]></description>
		<content:encoded><![CDATA[<p>Oh &#8211; and it&#8217;s the same backtick at both sides:<br />
x=`expr 20 + 30`<br />
rather than<br />
x=&#8217;expr 20 + 30`</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simple Maths in the Unix Shell by unixshell</title>
		<link>http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5945</link>
		<dc:creator><![CDATA[unixshell]]></dc:creator>
		<pubDate>Sun, 31 Mar 2013 18:53:41 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5945</guid>
		<description><![CDATA[@sam - you&#039;ll need spaces around the arguments to expr:
x=`expr 20 + 30`
rather than
x=`expr 20+30`
Also, no need for semicolons to end statements, and of course you&#039;ll need to close the quote on the first echo statement.
Once that&#039;s done, you should get &quot;50&quot; as the answer!]]></description>
		<content:encoded><![CDATA[<p>@sam &#8211; you&#8217;ll need spaces around the arguments to expr:<br />
x=`expr 20 + 30`<br />
rather than<br />
x=`expr 20+30`<br />
Also, no need for semicolons to end statements, and of course you&#8217;ll need to close the quote on the first echo statement.<br />
Once that&#8217;s done, you should get &#8220;50&#8243; as the answer!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simple Maths in the Unix Shell by sam</title>
		<link>http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5944</link>
		<dc:creator><![CDATA[sam]]></dc:creator>
		<pubDate>Sun, 31 Mar 2013 13:37:56 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5944</guid>
		<description><![CDATA[echo &quot;The sum is
x=&#039;expr 20+30&#039; ;
echo $x;
output??]]></description>
		<content:encoded><![CDATA[<p>echo &#8220;The sum is<br />
x=&#8217;expr 20+30&#8242; ;<br />
echo $x;<br />
output??</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arcade Games written in a Shell Script by kanimozhi</title>
		<link>http://nixshell.wordpress.com/2011/07/13/arcade-games-written-in-a-shell-script/#comment-5936</link>
		<dc:creator><![CDATA[kanimozhi]]></dc:creator>
		<pubDate>Wed, 13 Mar 2013 14:49:17 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/?p=194#comment-5936</guid>
		<description><![CDATA[thanks for code]]></description>
		<content:encoded><![CDATA[<p>thanks for code</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on IFS &#8211; Internal Field Separator by Viele MP3s zu einem machen &#124; staplerfaris</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5929</link>
		<dc:creator><![CDATA[Viele MP3s zu einem machen &#124; staplerfaris]]></dc:creator>
		<pubDate>Sat, 02 Mar 2013 16:01:14 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5929</guid>
		<description><![CDATA[[...] Shell ist die Debian-Almquist-shell (dash), um die Sache möglichst POSIX-konform zu halten. &#8220;IFS&#8221; ist übrigens eine extrem nützliche Umgebunsvariable. Das ganze lässt sich wunderbar in [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Shell ist die Debian-Almquist-shell (dash), um die Sache möglichst POSIX-konform zu halten. &#8220;IFS&#8221; ist übrigens eine extrem nützliche Umgebunsvariable. Das ganze lässt sich wunderbar in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simple Maths in the Unix Shell by Mahender</title>
		<link>http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5919</link>
		<dc:creator><![CDATA[Mahender]]></dc:creator>
		<pubDate>Tue, 15 Jan 2013 23:18:48 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5919</guid>
		<description><![CDATA[Thanks for sharing this, very good inputs. Mahender &lt;a href=&quot;http://etllabs.com/unix/&quot; rel=&quot;nofollow&quot;&gt;UNIX Labs  &lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>Thanks for sharing this, very good inputs. Mahender <a href="http://etllabs.com/unix/" rel="nofollow">UNIX Labs  </a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simple Maths in the Unix Shell by swathi @ unix scripts forum</title>
		<link>http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5786</link>
		<dc:creator><![CDATA[swathi @ unix scripts forum]]></dc:creator>
		<pubDate>Thu, 11 Oct 2012 11:46:36 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5786</guid>
		<description><![CDATA[Thanks for this useful article. For more details on bc and expr commands check the following links:
&lt;a href=&quot;http://www.folkstalk.com/2012/09/bc-command-examples-in-unix-linux.html&quot; rel=&quot;nofollow&quot;&gt;bc command examples in unix&lt;/a&gt;
&lt;a href=&quot;http://www.folkstalk.com/2012/09/expr-command-examples-in-unix-linux.html&quot; rel=&quot;nofollow&quot;&gt;expr command examples in unix&lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>Thanks for this useful article. For more details on bc and expr commands check the following links:<br />
<a href="http://www.folkstalk.com/2012/09/bc-command-examples-in-unix-linux.html" rel="nofollow">bc command examples in unix</a><br />
<a href="http://www.folkstalk.com/2012/09/expr-command-examples-in-unix-linux.html" rel="nofollow">expr command examples in unix</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arcade Games written in a Shell Script by jayeola</title>
		<link>http://nixshell.wordpress.com/2011/07/13/arcade-games-written-in-a-shell-script/#comment-5741</link>
		<dc:creator><![CDATA[jayeola]]></dc:creator>
		<pubDate>Sun, 29 Jul 2012 01:10:02 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/?p=194#comment-5741</guid>
		<description><![CDATA[Do you mind if I create a repo on github for space.sh? Thanks for posting the code.]]></description>
		<content:encoded><![CDATA[<p>Do you mind if I create a repo on github for space.sh? Thanks for posting the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Variables &#8211; When to use a &#8216;dollar&#8217; symbol by venu</title>
		<link>http://nixshell.wordpress.com/2007/03/19/variables-when-to-use-a-dollar-symbol/#comment-5663</link>
		<dc:creator><![CDATA[venu]]></dc:creator>
		<pubDate>Tue, 12 Jun 2012 10:58:19 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/03/19/variables-when-to-use-a-dollar-symbol/#comment-5663</guid>
		<description><![CDATA[Thank You..It provided the basic info about &quot;$&quot;]]></description>
		<content:encoded><![CDATA[<p>Thank You..It provided the basic info about &#8220;$&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Simple Maths in the Unix Shell by Jani "robsku" Saksa</title>
		<link>http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5590</link>
		<dc:creator><![CDATA[Jani "robsku" Saksa]]></dc:creator>
		<pubDate>Sat, 25 Feb 2012 03:25:04 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/01/29/simple-maths-in-the-unix-shell/#comment-5590</guid>
		<description><![CDATA[And scripts made for bash should use #!/bin/bash , NOT #!/bin/sh anyway :)

To make sure your script is compatible with *pure* bourne shell - if you don&#039;t actually have it (not available for Linux it seems) you might want to grab source code of Heirloom Bourne Shell, compile and install it - also comes with nice man page where you can easily check what is possible with it and then if not sure you can view if something you have used to in bash is possible - the man page is much shorter and easier to read than bash man page as the features are SO much more limited :)]]></description>
		<content:encoded><![CDATA[<p>And scripts made for bash should use #!/bin/bash , NOT #!/bin/sh anyway <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To make sure your script is compatible with *pure* bourne shell &#8211; if you don&#8217;t actually have it (not available for Linux it seems) you might want to grab source code of Heirloom Bourne Shell, compile and install it &#8211; also comes with nice man page where you can easily check what is possible with it and then if not sure you can view if something you have used to in bash is possible &#8211; the man page is much shorter and easier to read than bash man page as the features are SO much more limited <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculating Averages by Jani "robsku" Saksa</title>
		<link>http://nixshell.wordpress.com/2007/03/26/calculating-averages/#comment-5589</link>
		<dc:creator><![CDATA[Jani "robsku" Saksa]]></dc:creator>
		<pubDate>Sat, 25 Feb 2012 01:34:34 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/03/26/calculating-averages/#comment-5589</guid>
		<description><![CDATA[/bin/sh in Linux is on most distros a symlink to bash (or dash) and when run it actually runs &quot;Bash in POSIX compatibility mode&quot;, which should be like Bourne Shell, but neither Bash nor Dash is good for actually testing if your script runs on real Bourne Shell.

For those wanting to make sure their script is Bourne Shell compatible but you don&#039;t have actual Bourne Shell available, Heirloom Bourne Shell is something you may want to look into - comes in source package, no configure script, you just have to edit very simple modifications to very simple Makefile, compile and install and you have Bourne Shell with NO extensions whatsoever - with that I&#039;ve learned a lot on how much imagination and crazy hacks you may have to achieve to do things that in Bash are quite normal things to do :) It may be fun, I for one like to do some hobby projects &quot;just to see if I can&quot; where I try to do something in Bourne Shell - like transforming script relying on recursive function calls into Bourne Shell which has no function local variables, only script global ones (hint: subprocess inside function can help, of course the things you can do are limited, subprocess can have it&#039;s own variables, but you can&#039;t change variables outside it, he-he).]]></description>
		<content:encoded><![CDATA[<p>/bin/sh in Linux is on most distros a symlink to bash (or dash) and when run it actually runs &#8220;Bash in POSIX compatibility mode&#8221;, which should be like Bourne Shell, but neither Bash nor Dash is good for actually testing if your script runs on real Bourne Shell.</p>
<p>For those wanting to make sure their script is Bourne Shell compatible but you don&#8217;t have actual Bourne Shell available, Heirloom Bourne Shell is something you may want to look into &#8211; comes in source package, no configure script, you just have to edit very simple modifications to very simple Makefile, compile and install and you have Bourne Shell with NO extensions whatsoever &#8211; with that I&#8217;ve learned a lot on how much imagination and crazy hacks you may have to achieve to do things that in Bash are quite normal things to do <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It may be fun, I for one like to do some hobby projects &#8220;just to see if I can&#8221; where I try to do something in Bourne Shell &#8211; like transforming script relying on recursive function calls into Bourne Shell which has no function local variables, only script global ones (hint: subprocess inside function can help, of course the things you can do are limited, subprocess can have it&#8217;s own variables, but you can&#8217;t change variables outside it, he-he).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on IFS &#8211; Internal Field Separator by Cokes</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5566</link>
		<dc:creator><![CDATA[Cokes]]></dc:creator>
		<pubDate>Sun, 29 Jan 2012 11:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5566</guid>
		<description><![CDATA[Good Work ! Thanks.]]></description>
		<content:encoded><![CDATA[<p>Good Work ! Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Arcade Games written in a Shell Script by Acid Plasm</title>
		<link>http://nixshell.wordpress.com/2011/07/13/arcade-games-written-in-a-shell-script/#comment-5561</link>
		<dc:creator><![CDATA[Acid Plasm]]></dc:creator>
		<pubDate>Mon, 09 Jan 2012 18:04:18 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/?p=194#comment-5561</guid>
		<description><![CDATA[Let it never be said that shell scripting isn&#039;t functional.  If you can make games you can do anything...right? Thanks for the link to the code

Great post.]]></description>
		<content:encoded><![CDATA[<p>Let it never be said that shell scripting isn&#8217;t functional.  If you can make games you can do anything&#8230;right? Thanks for the link to the code</p>
<p>Great post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on awk one-liners by anusha</title>
		<link>http://nixshell.wordpress.com/2009/04/01/awk-one-liners/#comment-5555</link>
		<dc:creator><![CDATA[anusha]]></dc:creator>
		<pubDate>Thu, 29 Dec 2011 08:58:21 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/?p=98#comment-5555</guid>
		<description><![CDATA[very very Thanks.these examples are really helpful to me]]></description>
		<content:encoded><![CDATA[<p>very very Thanks.these examples are really helpful to me</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Timestamps for Log Files by linux shell date string &#171; Lost Ferry</title>
		<link>http://nixshell.wordpress.com/2007/03/11/timestamps-for-log-files/#comment-5535</link>
		<dc:creator><![CDATA[linux shell date string &#171; Lost Ferry]]></dc:creator>
		<pubDate>Fri, 18 Nov 2011 15:09:56 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/03/11/timestamps-for-log-files/#comment-5535</guid>
		<description><![CDATA[[...] shell date&#160;string  from: [1] [...]]]></description>
		<content:encoded><![CDATA[<p>[...] shell date&nbsp;string  from: [1] [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on suid shell scripts &#8211; setting &#8220;the SUID bit&#8221; by unixshell</title>
		<link>http://nixshell.wordpress.com/2007/04/21/suid-shell-scripts-setting-the-sticky-bit/#comment-5505</link>
		<dc:creator><![CDATA[unixshell]]></dc:creator>
		<pubDate>Mon, 10 Oct 2011 00:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/04/21/suid-shell-scripts-setting-the-sticky-bit/#comment-5505</guid>
		<description><![CDATA[SUID is dangerous because any user can run it with &quot;root&quot; privileges. Any program granted SUID privileges must be thoroughly inspected and totally trusted.

Shell scripts - being readable as well as executable, and particularly being in plain-text also - are especially vulnerable to attack, as an attacker can see how their input will be treated before even attempting to exploit the script. Anything they get the script to run, will be run with superuser privileges.]]></description>
		<content:encoded><![CDATA[<p>SUID is dangerous because any user can run it with &#8220;root&#8221; privileges. Any program granted SUID privileges must be thoroughly inspected and totally trusted.</p>
<p>Shell scripts &#8211; being readable as well as executable, and particularly being in plain-text also &#8211; are especially vulnerable to attack, as an attacker can see how their input will be treated before even attempting to exploit the script. Anything they get the script to run, will be run with superuser privileges.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on suid shell scripts &#8211; setting &#8220;the SUID bit&#8221; by Ekevoo</title>
		<link>http://nixshell.wordpress.com/2007/04/21/suid-shell-scripts-setting-the-sticky-bit/#comment-5504</link>
		<dc:creator><![CDATA[Ekevoo]]></dc:creator>
		<pubDate>Mon, 10 Oct 2011 00:38:23 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/04/21/suid-shell-scripts-setting-the-sticky-bit/#comment-5504</guid>
		<description><![CDATA[So, how is a SUID script dangerous? You forgot to tell!]]></description>
		<content:encoded><![CDATA[<p>So, how is a SUID script dangerous? You forgot to tell!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on lsof, fuser, nohup, disown, bg, fg, and jobs by unixshell</title>
		<link>http://nixshell.wordpress.com/2011/02/04/lsof-fuser-nohup-disown-bg-fg-and-jobs/#comment-5496</link>
		<dc:creator><![CDATA[unixshell]]></dc:creator>
		<pubDate>Thu, 06 Oct 2011 00:20:53 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/?p=161#comment-5496</guid>
		<description><![CDATA[Quite a lot of this is covered in my book (http://www.amazon.com/dp/1118024486/ref=as_li_qf_sp_asin_til?tag=steveparkeror-20) - particularly Chapter 10. There is a great deal of depth behind these commands, and the concepts behind them, which is not particularly well covered by any documentation that I am aware of.]]></description>
		<content:encoded><![CDATA[<p>Quite a lot of this is covered in my book (<a href="http://www.amazon.com/dp/1118024486/ref=as_li_qf_sp_asin_til?tag=steveparkeror-20" rel="nofollow">http://www.amazon.com/dp/1118024486/ref=as_li_qf_sp_asin_til?tag=steveparkeror-20</a>) &#8211; particularly Chapter 10. There is a great deal of depth behind these commands, and the concepts behind them, which is not particularly well covered by any documentation that I am aware of.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ten Good Unix Habits by unixshell</title>
		<link>http://nixshell.wordpress.com/2010/06/22/ten-good-unix-habits/#comment-5480</link>
		<dc:creator><![CDATA[unixshell]]></dc:creator>
		<pubDate>Thu, 01 Sep 2011 17:26:19 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/?p=134#comment-5480</guid>
		<description><![CDATA[The explanations are in the IBM article; for example, 2 is about the &quot;tar -C /path&quot; syntax...]]></description>
		<content:encoded><![CDATA[<p>The explanations are in the IBM article; for example, 2 is about the &#8220;tar -C /path&#8221; syntax&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ten Good Unix Habits by kcoder24</title>
		<link>http://nixshell.wordpress.com/2010/06/22/ten-good-unix-habits/#comment-5479</link>
		<dc:creator><![CDATA[kcoder24]]></dc:creator>
		<pubDate>Thu, 01 Sep 2011 16:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/?p=134#comment-5479</guid>
		<description><![CDATA[I don&#039;t get the meaning in several, can you explain how to implement every one? Here are the ones that I understand

1 mkdir -p
2 ?
3 ?
4 Use doble quotes only when it´s really needed?
5 Mmmmh I understand use \n instead the enter itself, but why? what&#039;s the difference?
6 Group... in a file and execute? or maybe use pipes?
7 Why use xargs instead find -exec
8 Detect when is usefull grep and when &quot;grep -c&quot;
9 awk &#039;$2~/RegExp/&#039; instead grep &quot;RegExp&quot;
10 That&#039;s classic stop using cat to pipe the output to another command]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t get the meaning in several, can you explain how to implement every one? Here are the ones that I understand</p>
<p>1 mkdir -p<br />
2 ?<br />
3 ?<br />
4 Use doble quotes only when it´s really needed?<br />
5 Mmmmh I understand use \n instead the enter itself, but why? what&#8217;s the difference?<br />
6 Group&#8230; in a file and execute? or maybe use pipes?<br />
7 Why use xargs instead find -exec<br />
8 Detect when is usefull grep and when &#8220;grep -c&#8221;<br />
9 awk &#8216;$2~/RegExp/&#8217; instead grep &#8220;RegExp&#8221;<br />
10 That&#8217;s classic stop using cat to pipe the output to another command</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on awk one-liners by kcoder24</title>
		<link>http://nixshell.wordpress.com/2009/04/01/awk-one-liners/#comment-5478</link>
		<dc:creator><![CDATA[kcoder24]]></dc:creator>
		<pubDate>Thu, 01 Sep 2011 16:01:43 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/?p=98#comment-5478</guid>
		<description><![CDATA[Hi, good collection of one-liners. Eric Pement has already awk1line.txt and Peteris Krumis explain them in a very detailed way. So take a look here 
http://www.catonmat.net/series/awk-one-liners-explained
An easy tip, the default action for a pattern is print $0, so you can make shorter several one-liners, e.g. for print all lines
awk &#039;{print 0}&#039; file_name  ==&gt;  awk &#039;1&#039; file_name]]></description>
		<content:encoded><![CDATA[<p>Hi, good collection of one-liners. Eric Pement has already awk1line.txt and Peteris Krumis explain them in a very detailed way. So take a look here<br />
<a href="http://www.catonmat.net/series/awk-one-liners-explained" rel="nofollow">http://www.catonmat.net/series/awk-one-liners-explained</a><br />
An easy tip, the default action for a pattern is print $0, so you can make shorter several one-liners, e.g. for print all lines<br />
awk &#8216;{print 0}&#8217; file_name  ==&gt;  awk &#8217;1&#8242; file_name</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Shell Scripting Recipes by Steve Parker</title>
		<link>http://nixshell.wordpress.com/2011/03/03/shell-scripting-recipes/#comment-5476</link>
		<dc:creator><![CDATA[Steve Parker]]></dc:creator>
		<pubDate>Thu, 25 Aug 2011 00:30:01 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/?p=163#comment-5476</guid>
		<description><![CDATA[The book is now available at Amazon (http://amzn.com/1118024486) and other bookshops. It seems that it can take a few weeks for copies to wing their way around the planet, so UK availability looks like mid-September, for example. Latest updates available at http://facebook.com/shellscript]]></description>
		<content:encoded><![CDATA[<p>The book is now available at Amazon (<a href="http://amzn.com/1118024486" rel="nofollow">http://amzn.com/1118024486</a>) and other bookshops. It seems that it can take a few weeks for copies to wing their way around the planet, so UK availability looks like mid-September, for example. Latest updates available at <a href="http://facebook.com/shellscript" rel="nofollow">http://facebook.com/shellscript</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculating Averages by unixshell</title>
		<link>http://nixshell.wordpress.com/2007/03/26/calculating-averages/#comment-5454</link>
		<dc:creator><![CDATA[unixshell]]></dc:creator>
		<pubDate>Fri, 08 Jul 2011 22:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/03/26/calculating-averages/#comment-5454</guid>
		<description><![CDATA[Nicely done, delt. Functions and scripts can easily replace each other too, which is a really nice feature: $1 $2 $#, etc all work just as well for a function as for a script.

PS. There&#039;s no need for &#039;-p &quot;&quot;&#039;, it should default to a blank prompt]]></description>
		<content:encoded><![CDATA[<p>Nicely done, delt. Functions and scripts can easily replace each other too, which is a really nice feature: $1 $2 $#, etc all work just as well for a function as for a script.</p>
<p>PS. There&#8217;s no need for &#8216;-p &#8220;&#8221;&#8216;, it should default to a blank prompt</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculating Averages by delt</title>
		<link>http://nixshell.wordpress.com/2007/03/26/calculating-averages/#comment-5453</link>
		<dc:creator><![CDATA[delt]]></dc:creator>
		<pubDate>Fri, 08 Jul 2011 19:59:12 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/03/26/calculating-averages/#comment-5453</guid>
		<description><![CDATA[#!/bin/sh
# Copied/pasted directly from: http://nixshell.wordpress.com/2007/03/26/calculating-averages/
# Then modified a little - mainly for taking numbers directly from the command line.  - delt.

n=0     # n being the number of (valid) data provided
sum=0   # sum being the running total of all data

# &quot;Note that by using ^D (aka &quot;EOF&quot;) to quit, this script will work just as well blah blah&quot;
# -- Thanks, so i can make a function out of this and pipe data directly into it =)

function calc_avg() {
  while read -p &quot;&quot; x; do
    sum=`expr $sum + $x` &amp;&amp; n=$[n+1]  # &quot;expr&quot; return status indicates if valid integer or not
  done

  # ok, finished adding, now calculate the average.
  echo &quot;scale=2;$sum/$n&quot; &#124; bc
}

# like said above, just pipe $* args through calc_avg with a newline between each one.
echo $* &#124; tr &#039; &#039; &#039;\n&#039; &#124; calc_avg


### TODO: write a version that accepts floating point numbers as arguments ###]]></description>
		<content:encoded><![CDATA[<p>#!/bin/sh<br />
# Copied/pasted directly from: <a href="http://nixshell.wordpress.com/2007/03/26/calculating-averages/" rel="nofollow">http://nixshell.wordpress.com/2007/03/26/calculating-averages/</a><br />
# Then modified a little &#8211; mainly for taking numbers directly from the command line.  &#8211; delt.</p>
<p>n=0     # n being the number of (valid) data provided<br />
sum=0   # sum being the running total of all data</p>
<p># &#8220;Note that by using ^D (aka &#8220;EOF&#8221;) to quit, this script will work just as well blah blah&#8221;<br />
# &#8212; Thanks, so i can make a function out of this and pipe data directly into it =)</p>
<p>function calc_avg() {<br />
  while read -p &#8220;&#8221; x; do<br />
    sum=`expr $sum + $x` &amp;&amp; n=$[n+1]  # &#8220;expr&#8221; return status indicates if valid integer or not<br />
  done</p>
<p>  # ok, finished adding, now calculate the average.<br />
  echo &#8220;scale=2;$sum/$n&#8221; | bc<br />
}</p>
<p># like said above, just pipe $* args through calc_avg with a newline between each one.<br />
echo $* | tr &#8216; &#8216; &#8216;\n&#8217; | calc_avg</p>
<p>### TODO: write a version that accepts floating point numbers as arguments ###</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on lsof, fuser, nohup, disown, bg, fg, and jobs by Colin Hines</title>
		<link>http://nixshell.wordpress.com/2011/02/04/lsof-fuser-nohup-disown-bg-fg-and-jobs/#comment-5434</link>
		<dc:creator><![CDATA[Colin Hines]]></dc:creator>
		<pubDate>Sun, 05 Jun 2011 04:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/?p=161#comment-5434</guid>
		<description><![CDATA[I&#039;d like to see more on this topic -- I stumbled across your website recently after joining #bash.  Saw the book, hopefully it will be mentioned in that or the pdf.  I have used both lsof and fuser in the past but only on very specific tasks. I prefer lsof probably because I&#039;ve used it more being that most of the machines I manage are linux, but I would like to understand more about fuser as well and how it can help me tracking processes...]]></description>
		<content:encoded><![CDATA[<p>I&#8217;d like to see more on this topic &#8212; I stumbled across your website recently after joining #bash.  Saw the book, hopefully it will be mentioned in that or the pdf.  I have used both lsof and fuser in the past but only on very specific tasks. I prefer lsof probably because I&#8217;ve used it more being that most of the machines I manage are linux, but I would like to understand more about fuser as well and how it can help me tracking processes&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
