<?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/"
		>
<channel>
	<title>Comments on: Simple backup script for Ubuntu</title>
	<atom:link href="http://marianoiglesias.com.ar/ubuntu/simple-backup-script-for-ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://marianoiglesias.com.ar/ubuntu/simple-backup-script-for-ubuntu/</link>
	<description>A glimpse at a coder&#039;s troubled mind</description>
	<lastBuildDate>Wed, 30 Jun 2010 11:12:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Dieter_be [Visitor]</title>
		<link>http://marianoiglesias.com.ar/ubuntu/simple-backup-script-for-ubuntu/comment-page-1/#comment-53</link>
		<dc:creator>Dieter_be [Visitor]</dc:creator>
		<pubDate>Sat, 28 Jun 2008 10:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/simple-backup-script-for-ubuntu/#comment-53</guid>
		<description>Hi, here are some tips for you.&lt;br /&gt;
You can use other delimiters then &#039;/&#039; in sed.  So that if you plan to use slashes in your regex, you don&#039;t need to escape them. I usually delimit with &#039;#&#039; in this case.&lt;br /&gt;
So the command to strip trailing slashes becomes this : sed &#039;s#/$##&#039;&lt;br /&gt;
Note that &#039;-e&#039; is not needed, it&#039;s the default for sed.  Also you don&#039;t need the &#039;g&#039; pattern modifier.&lt;br /&gt;
Knowing this, you can make your regexes a lot easier ;-)&lt;br /&gt;
&lt;br /&gt;
Also check &#039;man test&#039;, you&#039;ll see that you can rewrite [ &quot;$1&quot; != &quot;&quot; ] into [ -n &quot;$1&quot; ]&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to echo &quot;&quot; for a newline, just echo without args, or add &quot;\n&quot; in your previous echo and use the -e flag.&lt;br /&gt;
&lt;br /&gt;
Also you might want to redirect your error messages to stderr.&lt;br /&gt;
&lt;br /&gt;
There is more stuff that can be improved... I suggest you go check out the bash tutorials at tldp.org. they are pretty good ;-)
</description>
		<content:encoded><![CDATA[<p>Hi, here are some tips for you.<br />
You can use other delimiters then &#8216;/&#8217; in sed.  So that if you plan to use slashes in your regex, you don&#8217;t need to escape them. I usually delimit with &#8216;#&#8217; in this case.<br />
So the command to strip trailing slashes becomes this : sed &#8216;s#/$##&#8217;<br />
Note that &#8216;-e&#8217; is not needed, it&#8217;s the default for sed.  Also you don&#8217;t need the &#8216;g&#8217; pattern modifier.<br />
Knowing this, you can make your regexes a lot easier <img src='http://marianoiglesias.com.ar/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Also check &#8216;man test&#8217;, you&#8217;ll see that you can rewrite [ "$1" != "" ] into [ -n "$1" ]</p>
<p>You don&#8217;t need to echo &#8220;&#8221; for a newline, just echo without args, or add &#8220;\n&#8221; in your previous echo and use the -e flag.</p>
<p>Also you might want to redirect your error messages to stderr.</p>
<p>There is more stuff that can be improved&#8230; I suggest you go check out the bash tutorials at tldp.org. they are pretty good <img src='http://marianoiglesias.com.ar/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk
Database Caching 10/22 queries in 0.047 seconds using disk

Served from: marianoiglesias.com.ar @ 2010-09-05 10:57:48 -->