Hi,
% n=`{echo 'a b'}
sets n to a list containing two elements, 'a' and 'b'. How can I set n
to a single string 'a b'? note that I must execute external
commands, so the obvious solution
% n='a b'
doesn't work for me.
Saludos,
--
Hugo
cant you just use $n ?
On Thu, Mar 11, 2010 at 12:43 PM, hugo rivera uai...@gmail.com wrote:
Hi,
% n=`{echo 'a b'}
sets n to a list containing two elements, 'a' and 'b'. How can I set n
to a single string 'a b'? note that I must execute external
commands, so the
cant you just use $n ?
No, because the number of spaces in between is important. But I found a solution
% ifs='
' n=`{echo 'a b'}
works fine. Sorry for the noise.
--
Hugo
what about this?
ifs='
' n=`{echo 'ab'}
or
ifs='' n=`{echo 'ab'}
if you don't mind the newline character being in the string.
On 11 March 2010 11:43, hugo rivera uai...@gmail.com wrote:
Hi,
% n=`{echo 'a b'}
sets n to a list containing two elements, 'a' and 'b'. How can
Yes, works just as I needed.
Thanks.
2010/3/11 roger peppe rogpe...@gmail.com:
what about this?
ifs='
' n=`{echo 'a b'}
or
ifs='' n=`{echo 'a b'}
if you don't mind the newline character being in the string.
--
Hugo