<?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: Get sed savvy &#8211; part 2</title>
	<atom:link href="http://eriwen.com/tools/get-sed-savvy-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://eriwen.com/tools/get-sed-savvy-2/</link>
	<description>Programming productively with open-source tools</description>
	<lastBuildDate>Sat, 06 Mar 2010 23:29:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Get sed savvy - part 3</title>
		<link>http://eriwen.com/tools/get-sed-savvy-2/#comment-909</link>
		<dc:creator>Get sed savvy - part 3</dc:creator>
		<pubDate>Thu, 07 Aug 2008 23:06:34 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=64#comment-909</guid>
		<description>[...] Soon we&#8217;ll be looking at awk and other tools to continue the quest for command-line fluency. If you haven&#8217;t already, install Cygwin and check out part 1 and part 2. [...]</description>
		<content:encoded><![CDATA[<p>[...] Soon we&#8217;ll be looking at awk and other tools to continue the quest for command-line fluency. If you haven&#8217;t already, install Cygwin and check out part 1 and part 2. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Wendelin</title>
		<link>http://eriwen.com/tools/get-sed-savvy-2/#comment-879</link>
		<dc:creator>Eric Wendelin</dc:creator>
		<pubDate>Tue, 29 Jul 2008 18:44:13 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=64#comment-879</guid>
		<description>@Chris:
You beat me to mentioning it :). A very cool tidbit about sed, there.</description>
		<content:encoded><![CDATA[<p>@Chris:<br />
You beat me to mentioning it :). A very cool tidbit about sed, there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://eriwen.com/tools/get-sed-savvy-2/#comment-874</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 28 Jul 2008 23:37:42 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=64#comment-874</guid>
		<description>I know there are a million things worth mentioning about sed, but an often overlooked one is that the regular expression separators can be any character as long as they are consistent.  The following examples all perform the same inline global search for &quot;/tmp&quot; and replace it with &quot;/home&quot; in the test.txt file:

sed -i &#039;s/\/tmp/\/home/g&#039; test.txt  # ugly and requires escaping

sed -i &#039;s&#124;/tmp&#124;/home&#124;g&#039; test.txt    # better but still cluttered

sed -i &#039;s_/tmp_/home_g&#039; test.txt    # open and easily readable

Changing the regular expression separator can be helpful at maintaining readability, especially when you are matching something with a &quot;/&quot;.

-Chris</description>
		<content:encoded><![CDATA[<p>I know there are a million things worth mentioning about sed, but an often overlooked one is that the regular expression separators can be any character as long as they are consistent.  The following examples all perform the same inline global search for &#8220;/tmp&#8221; and replace it with &#8220;/home&#8221; in the test.txt file:</p>
<p>sed -i &#8217;s/\/tmp/\/home/g&#8217; test.txt  # ugly and requires escaping</p>
<p>sed -i &#8217;s|/tmp|/home|g&#8217; test.txt    # better but still cluttered</p>
<p>sed -i &#8217;s_/tmp_/home_g&#8217; test.txt    # open and easily readable</p>
<p>Changing the regular expression separator can be helpful at maintaining readability, especially when you are matching something with a &#8220;/&#8221;.</p>
<p>-Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Wendelin</title>
		<link>http://eriwen.com/tools/get-sed-savvy-2/#comment-869</link>
		<dc:creator>Eric Wendelin</dc:creator>
		<pubDate>Fri, 25 Jul 2008 06:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=64#comment-869</guid>
		<description>@Reginald:

Fair request :) Here is one of my references linked in the comments and 1st article: http://www.student.northpark.edu/pemente/sed/sed1line.txt</description>
		<content:encoded><![CDATA[<p>@Reginald:</p>
<p>Fair request :) Here is one of my references linked in the comments and 1st article: <a href="http://www.student.northpark.edu/pemente/sed/sed1line.txt" rel="nofollow">http://www.student.northpark.edu/pemente/sed/sed1line.txt</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gialloporpora</title>
		<link>http://eriwen.com/tools/get-sed-savvy-2/#comment-868</link>
		<dc:creator>gialloporpora</dc:creator>
		<pubDate>Thu, 24 Jul 2008 21:53:12 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=64#comment-868</guid>
		<description>Good tutorial :-)
I  am a Windows user, but I like sed very much, it is one of the most useful tool that I know (I am using the Gnuwin32 sed).
I have used it to recover &quot;deleted messages  in Thunderbird (they are deleted only when folder are compacted, first of compating they are hidden):

http://www.gialloporpora.netsons.org/usare-sed-per-recuperare-le-email-invisibili-in-thunderbird/268/

or to create bookmarklet. I prefere to work with a javascript code in localost with a standard bookmarklet that inject it in my pages, but when I have finished I transform the file.js in a bookmarklet with this sed line (I have found the code in some place on the web, but I don&#039;t remember the URL):

sed -e :a -e &quot;/$/N; s/\n//; ta&quot; &gt; file.js


this is an windows syntax.

Ciao
Sandro</description>
		<content:encoded><![CDATA[<p>Good tutorial :-)<br />
I  am a Windows user, but I like sed very much, it is one of the most useful tool that I know (I am using the Gnuwin32 sed).<br />
I have used it to recover &#8220;deleted messages  in Thunderbird (they are deleted only when folder are compacted, first of compating they are hidden):</p>
<p><a href="http://www.gialloporpora.netsons.org/usare-sed-per-recuperare-le-email-invisibili-in-thunderbird/268/" rel="nofollow">http://www.gialloporpora.netsons.org/usare-sed-per-recuperare-le-email-invisibili-in-thunderbird/268/</a></p>
<p>or to create bookmarklet. I prefere to work with a javascript code in localost with a standard bookmarklet that inject it in my pages, but when I have finished I transform the file.js in a bookmarklet with this sed line (I have found the code in some place on the web, but I don&#8217;t remember the URL):</p>
<p>sed -e :a -e &#8220;/$/N; s/\n//; ta&#8221; &gt; file.js</p>
<p>this is an windows syntax.</p>
<p>Ciao<br />
Sandro</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reginald Wadham</title>
		<link>http://eriwen.com/tools/get-sed-savvy-2/#comment-861</link>
		<dc:creator>Reginald Wadham</dc:creator>
		<pubDate>Thu, 24 Jul 2008 08:38:01 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=64#comment-861</guid>
		<description>Can we have more examples?</description>
		<content:encoded><![CDATA[<p>Can we have more examples?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Wendelin</title>
		<link>http://eriwen.com/tools/get-sed-savvy-2/#comment-858</link>
		<dc:creator>Eric Wendelin</dc:creator>
		<pubDate>Wed, 23 Jul 2008 20:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=64#comment-858</guid>
		<description>@David Regal:
Glad I could clear it up. The comma thing is probably the best feature of sed besides substitution.</description>
		<content:encoded><![CDATA[<p>@David Regal:<br />
Glad I could clear it up. The comma thing is probably the best feature of sed besides substitution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Regal</title>
		<link>http://eriwen.com/tools/get-sed-savvy-2/#comment-857</link>
		<dc:creator>David Regal</dc:creator>
		<pubDate>Wed, 23 Jul 2008 19:43:02 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=64#comment-857</guid>
		<description>Finally, the mysterious comma is explained.  Sed takes the two matches like addresses, but wow, that&#039;s not documented well in the man pages.

Gracias.

Details:

I was looking at someone else&#039;s sed code that had a comma between two patterns.  When I played with it, I was thinking the comma was a commmand, and couldn&#039;t figure it out until I read this page.

When I would take the comma out, or replace it with another character (e.g. a period), sed would complain of a unknown command.

$./script
sed: -e expression #1, char 132: unknown command: `.&#039;
$

Now I understand. Taking away the comma changes the context of the pattern (no longer an address).</description>
		<content:encoded><![CDATA[<p>Finally, the mysterious comma is explained.  Sed takes the two matches like addresses, but wow, that&#8217;s not documented well in the man pages.</p>
<p>Gracias.</p>
<p>Details:</p>
<p>I was looking at someone else&#8217;s sed code that had a comma between two patterns.  When I played with it, I was thinking the comma was a commmand, and couldn&#8217;t figure it out until I read this page.</p>
<p>When I would take the comma out, or replace it with another character (e.g. a period), sed would complain of a unknown command.</p>
<p>$./script<br />
sed: -e expression #1, char 132: unknown command: `.&#8217;<br />
$</p>
<p>Now I understand. Taking away the comma changes the context of the pattern (no longer an address).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
