SCIENTIFIC-LINUX-USERS Archives

June 2014

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Whidby <[log in to unmask]>
Reply To:
Mark Whidby <[log in to unmask]>
Date:
Mon, 9 Jun 2014 21:12:14 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
On Mon, 2014-06-09 at 13:09 -0700, ToddAndMargo wrote:
> Hi All,
> 
> What am I missing here?  Where did all my spaces go?
> Is this $IFS's doing?
> 
> I can substitute dots for spaces, so I don't have to
> have a solution, I'm just curious what went wrong.
> 
> Many thanks,
> -T
> 
> $ A=abc
> B=xyz
> C="${A}    ${B}"
> 
> echo $C
> abc xyz

You need to enclose $C in quotes:

echo "$C"

ATOM RSS1 RSS2