From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Wed, 26 Nov 2014 05:33:16 -0800 To: 9fans@9fans.net Message-ID: In-Reply-To: <5475D4A6.8040007@gmx.de> References: <56e1b340c04205d978d0bf01624c79f6@quintile.net> <5475D4A6.8040007@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] rc and whitespaces Topicbox-Message-UUID: 2e65f81e-ead9-11e9-9d60-3106f5b1d025 > This is also fine, a b and c are just two fields when they > enter echo but they leave the appear to be 3 seperate words. > > hugo% s=`{echo '''a b''' c} > hugo% echo $#s $s(1) > 3 'a > This is disappointing, I was hoping that I would get > 2 args and the first would be 'a b' (quotes here for > clarity, I was hoping there would be none in the assinged > variable $s > > Is this what one would expect or is the text parsing > by `{ .. } different to rc's normal one - dare I say broken. f.psiorz@gmx.de is correct. expected behavior. you could wrap tokenize in a little program outputting a token per line and then do ifs=$nl s=`{echo $list | tokenize} 9atom's rc has additional syntax that prevents ifs from being global shared state (and the source of many script interation bugs) s=`$nl {echo $list | tokenize} - erik