<?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 on: IFS &#8211; Internal Field Separator</title>
	<atom:link href="http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/feed/" rel="self" type="application/rss+xml" />
	<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/</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>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>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>By: 2010 in review &#171; *nix Shell</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5380</link>
		<dc:creator><![CDATA[2010 in review &#171; *nix Shell]]></dc:creator>
		<pubDate>Sun, 02 Jan 2011 12:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5380</guid>
		<description><![CDATA[[...] IFS &#8211; Internal Field Separator September 200710 comments  5 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] IFS &#8211; Internal Field Separator September 200710 comments  5 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tsolox</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5330</link>
		<dc:creator><![CDATA[tsolox]]></dc:creator>
		<pubDate>Fri, 01 Oct 2010 20:44:42 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5330</guid>
		<description><![CDATA[i prefer the explicit setting and the restoring to original value of IFS than that trick. That trick only assigns the new value to IFS within the &#039;while line&#039; and not within the while loop...which got me a little confused..and besides, i need the IFS inside the while loop..so it&#039;s better that i explicitely control the IFS value.]]></description>
		<content:encoded><![CDATA[<p>i prefer the explicit setting and the restoring to original value of IFS than that trick. That trick only assigns the new value to IFS within the &#8216;while line&#8217; and not within the while loop&#8230;which got me a little confused..and besides, i need the IFS inside the while loop..so it&#8217;s better that i explicitely control the IFS value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: unixshell</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5256</link>
		<dc:creator><![CDATA[unixshell]]></dc:creator>
		<pubDate>Sat, 16 May 2009 00:56:32 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5256</guid>
		<description><![CDATA[True. And perfectly valid.

I prefer the explicit mangling and unmangling of IFS, though this is also valid for all shells I am aware of.]]></description>
		<content:encoded><![CDATA[<p>True. And perfectly valid.</p>
<p>I prefer the explicit mangling and unmangling of IFS, though this is also valid for all shells I am aware of.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: linuxball</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5255</link>
		<dc:creator><![CDATA[linuxball]]></dc:creator>
		<pubDate>Fri, 15 May 2009 15:15:07 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5255</guid>
		<description><![CDATA[A somewhat simpler version below (does not require to save and restore IFS) does not set IFS globally but locally only for the following &quot;read&quot; command.

Background: 

  VAR1= [VAR2= ...] command

Above line sets and exports the environment variable(s) VAR1, VAR2, ... ONLY for the the environment of &quot;command&quot;. It will not change the setting for the current shell.  

Example:

#!/bin/sh
while IFS=, read qty product customer
do
  # process the information
  echo &quot;$customer wants $qty $product(s)&quot;
done &lt; myfile.txt]]></description>
		<content:encoded><![CDATA[<p>A somewhat simpler version below (does not require to save and restore IFS) does not set IFS globally but locally only for the following &#8220;read&#8221; command.</p>
<p>Background: </p>
<p>  VAR1= [VAR2= ...] command</p>
<p>Above line sets and exports the environment variable(s) VAR1, VAR2, &#8230; ONLY for the the environment of &#8220;command&#8221;. It will not change the setting for the current shell.  </p>
<p>Example:</p>
<p>#!/bin/sh<br />
while IFS=, read qty product customer<br />
do<br />
  # process the information<br />
  echo &#8220;$customer wants $qty $product(s)&#8221;<br />
done &lt; myfile.txt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: unixshell</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5232</link>
		<dc:creator><![CDATA[unixshell]]></dc:creator>
		<pubDate>Fri, 23 Jan 2009 02:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5232</guid>
		<description><![CDATA[Hello Kane,

Using ksh on Solaris, I ran this:

$ set&#124;grep IFS&#124;od -c
0000000   I   F   S   =   &#039;      \t  \n
0000010
$ 

This shows that IFS consists of a space (&quot; &quot;), a tab (&quot;\t&quot;) and a newline (&quot;\n&quot;).

This is the correct setting for IFS.

&quot;od&quot; stands for &quot;octal dump&quot;, and &quot;od -c&quot; displays each character as a byte. The &quot;0000000&quot; and &quot;0000010&quot; are the offsets (in Octal, base 8); the relevant stuff is the &quot;I   F   S   =   &#039;      \t  \n&quot; part.

Hope this helps.

Maybe I should write a post about od some time... it&#039;s a strange and arcane command, but it does sometimes turn out to be very useful.]]></description>
		<content:encoded><![CDATA[<p>Hello Kane,</p>
<p>Using ksh on Solaris, I ran this:</p>
<p>$ set|grep IFS|od -c<br />
0000000   I   F   S   =   &#8216;      \t  \n<br />
0000010<br />
$ </p>
<p>This shows that IFS consists of a space (&#8221; &#8220;), a tab (&#8220;\t&#8221;) and a newline (&#8220;\n&#8221;).</p>
<p>This is the correct setting for IFS.</p>
<p>&#8220;od&#8221; stands for &#8220;octal dump&#8221;, and &#8220;od -c&#8221; displays each character as a byte. The &#8220;0000000&#8243; and &#8220;0000010&#8243; are the offsets (in Octal, base 8); the relevant stuff is the &#8220;I   F   S   =   &#8216;      \t  \n&#8221; part.</p>
<p>Hope this helps.</p>
<p>Maybe I should write a post about od some time&#8230; it&#8217;s a strange and arcane command, but it does sometimes turn out to be very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kane</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5231</link>
		<dc:creator><![CDATA[kane]]></dc:creator>
		<pubDate>Thu, 22 Jan 2009 09:06:55 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5231</guid>
		<description><![CDATA[When i do set &#124; grep IFS

$ set &#124; grep IFS
HZ=&#039; &#039;
IFS=&#039; 
&#039;

Can someone tell is this IFS environment in KSH set correct by default?]]></description>
		<content:encoded><![CDATA[<p>When i do set | grep IFS</p>
<p>$ set | grep IFS<br />
HZ=&#8217; &#8216;<br />
IFS=&#8217;<br />
&#8216;</p>
<p>Can someone tell is this IFS environment in KSH set correct by default?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pai</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5229</link>
		<dc:creator><![CDATA[Pai]]></dc:creator>
		<pubDate>Mon, 19 Jan 2009 07:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5229</guid>
		<description><![CDATA[The article was really informaive thanks to the author.

Jonny thanks for your comment regarding line break seperator, it was of great help. 

Keep up the good work. 

cheers
pai]]></description>
		<content:encoded><![CDATA[<p>The article was really informaive thanks to the author.</p>
<p>Jonny thanks for your comment regarding line break seperator, it was of great help. </p>
<p>Keep up the good work. </p>
<p>cheers<br />
pai</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jonny</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5198</link>
		<dc:creator><![CDATA[jonny]]></dc:creator>
		<pubDate>Tue, 24 Jun 2008 19:41:20 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5198</guid>
		<description><![CDATA[looks like I lost my angle brackets and percent sign s on that last comment making the line:
printf ‘\n’ “$IFS” &#124; cat -vt
should read:
printf &#039;greaterThanPercentSignLowerCaseSGreaterThan\n&#039; &quot;$IFS&quot; &#124; cat -vt]]></description>
		<content:encoded><![CDATA[<p>looks like I lost my angle brackets and percent sign s on that last comment making the line:<br />
printf ‘\n’ “$IFS” | cat -vt<br />
should read:<br />
printf &#8216;greaterThanPercentSignLowerCaseSGreaterThan\n&#8217; &#8220;$IFS&#8221; | cat -vt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jonny</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5197</link>
		<dc:creator><![CDATA[jonny]]></dc:creator>
		<pubDate>Tue, 24 Jun 2008 19:35:38 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5197</guid>
		<description><![CDATA[Thanks for the awesome article!
also, if you want to use only the line breaks as a separator you can use
 IFS=$&#039;\n&#039;

I think the IFS gets set in your bashrc aka the IFS will get reset when you make a new shell... so if you want sub shells to see your change to IFS remember to use export.

if you want to peek at the value in your IFS, you might try:
 printf &#039;\n&#039; &quot;$IFS&quot; &#124; cat -vt
everything between the  is the value of your IFS in secret code.

looking at the return of
 set &#124; grep IFS
my IFS is set to
 IFS=$&#039; \t\n&#039;
When I open a shell.]]></description>
		<content:encoded><![CDATA[<p>Thanks for the awesome article!<br />
also, if you want to use only the line breaks as a separator you can use<br />
 IFS=$&#8217;\n&#8217;</p>
<p>I think the IFS gets set in your bashrc aka the IFS will get reset when you make a new shell&#8230; so if you want sub shells to see your change to IFS remember to use export.</p>
<p>if you want to peek at the value in your IFS, you might try:<br />
 printf &#8216;\n&#8217; &#8220;$IFS&#8221; | cat -vt<br />
everything between the  is the value of your IFS in secret code.</p>
<p>looking at the return of<br />
 set | grep IFS<br />
my IFS is set to<br />
 IFS=$&#8217; \t\n&#8217;<br />
When I open a shell.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: unixshell</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5196</link>
		<dc:creator><![CDATA[unixshell]]></dc:creator>
		<pubDate>Fri, 20 Jun 2008 16:35:50 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5196</guid>
		<description><![CDATA[You&#039;d have thought so, wouldn&#039;t you?

Watch out for quotation marks in the CSV... some applications use them, some don&#039;t. Some require them.]]></description>
		<content:encoded><![CDATA[<p>You&#8217;d have thought so, wouldn&#8217;t you?</p>
<p>Watch out for quotation marks in the CSV&#8230; some applications use them, some don&#8217;t. Some require them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mo6</title>
		<link>http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5195</link>
		<dc:creator><![CDATA[mo6]]></dc:creator>
		<pubDate>Fri, 20 Jun 2008 14:42:47 +0000</pubDate>
		<guid isPermaLink="false">http://nixshell.wordpress.com/2007/09/26/ifs-internal-field-separator/#comment-5195</guid>
		<description><![CDATA[Great stuff! Finally it&#039;s dead easy to create an CSV parser in BASH. Thanks.]]></description>
		<content:encoded><![CDATA[<p>Great stuff! Finally it&#8217;s dead easy to create an CSV parser in BASH. Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
