<?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#"
	
	>
<channel>
	<title>
	Comments on: Learning the Bash Shell	</title>
	<atom:link href="https://gregladen.com/blog/2008/02/23/learning-the-bash-shell/feed/" rel="self" type="application/rss+xml" />
	<link>https://gregladen.com/blog/2008/02/23/learning-the-bash-shell/</link>
	<description></description>
	<lastBuildDate>Sun, 24 Feb 2008 15:35:02 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.8</generator>
	<item>
		<title>
		By: Greg Laden		</title>
		<link>https://gregladen.com/blog/2008/02/23/learning-the-bash-shell/#comment-4284</link>

		<dc:creator><![CDATA[Greg Laden]]></dc:creator>
		<pubDate>Sun, 24 Feb 2008 15:35:02 +0000</pubDate>
		<guid isPermaLink="false">http://scienceblogs.com/gregladen/2008/02/23/learning-the-bash-shell/#comment-4284</guid>

					<description><![CDATA[Citizen:  Ha, &quot;code&quot; worked.  I had thought it would not given prior experience...Looks pretty good, too.]]></description>
			<content:encoded><![CDATA[<p>Citizen:  Ha, &#8220;code&#8221; worked.  I had thought it would not given prior experience&#8230;Looks pretty good, too.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Citizen Z		</title>
		<link>https://gregladen.com/blog/2008/02/23/learning-the-bash-shell/#comment-4283</link>

		<dc:creator><![CDATA[Citizen Z]]></dc:creator>
		<pubDate>Sun, 24 Feb 2008 13:19:03 +0000</pubDate>
		<guid isPermaLink="false">http://scienceblogs.com/gregladen/2008/02/23/learning-the-bash-shell/#comment-4283</guid>

					<description><![CDATA[Greg, for code snippets you can surround them with either the HTML &#060;sample&#062; or &#060;code&#062; tags.  That should change the default font in most browsers automatically, and they&#039;re &lt;a href=&quot;http://www.w3schools.com/tags/tag_phrase_elements.asp&quot; rel=&quot;nofollow&quot;&gt;valid HTML tags&lt;/a&gt;.]]></description>
			<content:encoded><![CDATA[<p>Greg, for code snippets you can surround them with either the HTML &lt;sample&gt; or &lt;code&gt; tags.  That should change the default font in most browsers automatically, and they&#8217;re <a href="http://www.w3schools.com/tags/tag_phrase_elements.asp" rel="nofollow">valid HTML tags</a>.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: peter		</title>
		<link>https://gregladen.com/blog/2008/02/23/learning-the-bash-shell/#comment-4282</link>

		<dc:creator><![CDATA[peter]]></dc:creator>
		<pubDate>Sun, 24 Feb 2008 05:01:25 +0000</pubDate>
		<guid isPermaLink="false">http://scienceblogs.com/gregladen/2008/02/23/learning-the-bash-shell/#comment-4282</guid>

					<description><![CDATA[#!/usr/bin/env bashsince bash may live elsewhere...]]></description>
			<content:encoded><![CDATA[<p>#!/usr/bin/env bashsince bash may live elsewhere&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Greg Laden		</title>
		<link>https://gregladen.com/blog/2008/02/23/learning-the-bash-shell/#comment-4281</link>

		<dc:creator><![CDATA[Greg Laden]]></dc:creator>
		<pubDate>Sat, 23 Feb 2008 22:04:03 +0000</pubDate>
		<guid isPermaLink="false">http://scienceblogs.com/gregladen/2008/02/23/learning-the-bash-shell/#comment-4281</guid>

					<description><![CDATA[All excellent suggestions.  I&#039;ll address each of them in my next post on the topic.I hope to have a CSS style appropriate for code as well.One quick thing for now:  The main syntax error in my code is the lack of spaces after the &quot;[&quot; and before th e &quot;]}This is interesting.  There needs to be a space before and after the [ because [ is a command in bash ... it is not punctuation.  The closing] on the other end is required (I think) in order to make the command structure excessively obscure.  Kind of a joke, really.So test -e $1 &amp;&amp; exit 0 is like [ -a $filename]  because [ means &#039;test&#039; in bash.test -e $1 and [ -a $filename] are the same kind of command because test = [ and they do the same thing because $1 is a parameter, and in my code, you would enter a filename.  So if my program was named &quot;isit&quot; the one might enter on the command line:isit document.txtand if document.txt exists, then absolutely nothing happens (a standard *nix result).  But the value returned would be 0, so my command could be used in another bash program like this:if isit document.txt ...and if the document.txt file exists, the if statement gets a zero, which in bash means &quot;yes&quot; or &quot;true.&quot;Rpenner:  It was very bad of me to not have the alternative (if the file does not exist) return a &#039;1&#039; ... which in bash means &quot;no&quot; or &quot;false&quot;Crap, I&#039;ve said more than I want to...]]></description>
			<content:encoded><![CDATA[<p>All excellent suggestions.  I&#8217;ll address each of them in my next post on the topic.I hope to have a CSS style appropriate for code as well.One quick thing for now:  The main syntax error in my code is the lack of spaces after the &#8220;[&#8221; and before th e &#8220;]}This is interesting.  There needs to be a space before and after the [ because [ is a command in bash &#8230; it is not punctuation.  The closing] on the other end is required (I think) in order to make the command structure excessively obscure.  Kind of a joke, really.So test -e $1 &#038;&#038; exit 0 is like [ -a $filename]  because [ means &#8216;test&#8217; in bash.test -e $1 and [ -a $filename] are the same kind of command because test = [ and they do the same thing because $1 is a parameter, and in my code, you would enter a filename.  So if my program was named &#8220;isit&#8221; the one might enter on the command line:isit document.txtand if document.txt exists, then absolutely nothing happens (a standard *nix result).  But the value returned would be 0, so my command could be used in another bash program like this:if isit document.txt &#8230;and if the document.txt file exists, the if statement gets a zero, which in bash means &#8220;yes&#8221; or &#8220;true.&#8221;Rpenner:  It was very bad of me to not have the alternative (if the file does not exist) return a &#8216;1&#8217; &#8230; which in bash means &#8220;no&#8221; or &#8220;false&#8221;Crap, I&#8217;ve said more than I want to&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: rpenner		</title>
		<link>https://gregladen.com/blog/2008/02/23/learning-the-bash-shell/#comment-4280</link>

		<dc:creator><![CDATA[rpenner]]></dc:creator>
		<pubDate>Sat, 23 Feb 2008 15:48:45 +0000</pubDate>
		<guid isPermaLink="false">http://scienceblogs.com/gregladen/2008/02/23/learning-the-bash-shell/#comment-4280</guid>

					<description><![CDATA[I have to recommend that you switch to a monospaced font for code examples where spaces are important and you want people to know if your zero is a number. (Admittedly, I can&#039;t figure out how to do that when &lt;pre&gt;, &lt;tt&gt; and &lt;span&gt; don&#039;t work for me in Preview.)Also, -a might work for what is built into bash, but -e or -f might fit your intent better, especially if you port your script to a shell which relies on an external binary to implement these sorts of tests.And why does your code fall off the end without an exit for the alternative case? This would make sense if this was the preamble to a script whose job it was to create the file one time only and signal success in the event it made the file or if the file was already there.And if what is coded is your intent, what&#039;s wrong with:&lt;span style=&quot;font: Courier New&quot;&gt;test -e $1 &amp;&amp; exit 0&lt;/span&gt;There is something wrong with my example, but it is not the syntax. (It is the differnce between computer science (best way) and electrical engineering (least keystrokes to make it work this time).)]]></description>
			<content:encoded><![CDATA[<p>I have to recommend that you switch to a monospaced font for code examples where spaces are important and you want people to know if your zero is a number. (Admittedly, I can&#8217;t figure out how to do that when </p>
<pre>, <tt> and <span> don't work for me in Preview.)Also, -a might work for what is built into bash, but -e or -f might fit your intent better, especially if you port your script to a shell which relies on an external binary to implement these sorts of tests.And why does your code fall off the end without an exit for the alternative case? This would make sense if this was the preamble to a script whose job it was to create the file one time only and signal success in the event it made the file or if the file was already there.And if what is coded is your intent, what's wrong with:<span style="font: Courier New">test -e $1 &#038;& exit 0</span>There is something wrong with my example, but it is not the syntax. (It is the differnce between computer science (best way) and electrical engineering (least keystrokes to make it work this time).)</span></tt></pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jim		</title>
		<link>https://gregladen.com/blog/2008/02/23/learning-the-bash-shell/#comment-4279</link>

		<dc:creator><![CDATA[Jim]]></dc:creator>
		<pubDate>Sat, 23 Feb 2008 14:56:40 +0000</pubDate>
		<guid isPermaLink="false">http://scienceblogs.com/gregladen/2008/02/23/learning-the-bash-shell/#comment-4279</guid>

					<description><![CDATA[For those stuck in a Windows world, &lt;a href=&quot;http://cygwin.com&quot; rel=&quot;nofollow nofollow nofollow&quot; rel=&quot;nofollow&quot;&gt;cygwin&lt;/a&gt; allows you to use a BASH shell (and a lot of other things) within Windows.  It&#039;s a valuable tool for those of us who need to run Windows, but need something more powerful than DOS (unless you really like DOS, of course).]]></description>
			<content:encoded><![CDATA[<p>For those stuck in a Windows world, <a href="http://cygwin.com" rel="nofollow nofollow nofollow" rel="nofollow">cygwin</a> allows you to use a BASH shell (and a lot of other things) within Windows.  It&#8217;s a valuable tool for those of us who need to run Windows, but need something more powerful than DOS (unless you really like DOS, of course).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Tony P		</title>
		<link>https://gregladen.com/blog/2008/02/23/learning-the-bash-shell/#comment-4278</link>

		<dc:creator><![CDATA[Tony P]]></dc:creator>
		<pubDate>Sat, 23 Feb 2008 13:53:22 +0000</pubDate>
		<guid isPermaLink="false">http://scienceblogs.com/gregladen/2008/02/23/learning-the-bash-shell/#comment-4278</guid>

					<description><![CDATA[#!/bin/bash]]></description>
			<content:encoded><![CDATA[<p>#!/bin/bash</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
