[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] (no subject)
From: |
John McKown |
Subject: |
Re: [Help-bash] (no subject) |
Date: |
Fri, 22 Sep 2017 10:43:43 -0500 |
On Fri, Sep 22, 2017 at 10:35 AM, Chet Ramey <address@hidden> wrote:
> On 9/22/17 11:33 AM, John McKown wrote:
>
> > I will agree that your method is superior. However, mine does work. At
> > least on my Linux system (Fedora 25)
> >
> > $ IFS="" lista=$(cat list)
> > $ echo $lista
> > hello
> > world
>
> This leaves IFS set to the empty string, which might lead to unexpected
> results for subsequent commands.
>
My bad. I overlooked that. I was thinking that since I didn't do an
"export IFS", that the variable only retained its value during the
execution of that one line. On my system, I see:
$ echo -n $IFS|od -tcx1
0000000
$ IFS="-" : do nothing
$ echo -n $IFS|od -tcx1
0000000
$
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU address@hidden http://cnswww.cns.cwru.edu/~
> chet/
>
--
*L'Shanah Tovah Tikatevu*
Maranatha! <><
John McKown