From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5475D4A6.8040007@gmx.de> Date: Wed, 26 Nov 2014 14:24:54 +0100 From: Friedrich Psiorz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> References: <56e1b340c04205d978d0bf01624c79f6@quintile.net> In-Reply-To: <56e1b340c04205d978d0bf01624c79f6@quintile.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [9fans] rc and whitespaces Topicbox-Message-UUID: 2e58d54e-ead9-11e9-9d60-3106f5b1d025 That behaviour is what I would expect. rc splits text in `{} according to $ifs, which is usually space, tab, and newline. It doesn't treat any characters special, including quotes. Am 26.11.2014 um 14:02 schrieb Steve Simon: > rc using backquote to parse strings, e.g: > > hugo% s=`{echo a b c} > hugo% echo $#s $s(1) > 3 a > This is fine > > hugo% s=`{echo 'a b' c} > hugo% echo $#s $s(1) > 3 a > 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. > > Is there a way round this? > > Thanks, > > -Steve >