Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #176522

Aw: Re: Bash different behaviour of read / strings in jessie versus stretch (regression?)

From "foo fighter" <lopiuh@gmx.net>
Newsgroups linux.debian.user
Subject Aw: Re: Bash different behaviour of read / strings in jessie versus stretch (regression?)
Date 2017-01-10 01:20 +0100
Message-ID <sXSkp-2vm-1@gated-at.bofh.it> (permalink)
References <sXD21-1hP-33@gated-at.bofh.it> <sXIEq-4UO-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Greg,
 
thanks for your answer. I used "read" because it offered different delimiter (IFS) at the same time as far as my elements are seperateed by LF or (one) space (per element). You are right it is stdout of other programs. Furthermore globbing was not intended in this area but I did not want to toggle globbing off/on  with "set" within the script. As far as mapfile needs LF as delimiter (as far as I see) I do now a search and replace (space to LF)

 
mapfile -t _array <<<"${_inputstring// /$'\n'}"
 
This works in both bash versions.
 
Thaaaaanks !!
 
Yours
 
Lopiuh

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bash different behaviour of read / strings in jessie versus stretch  (regression?) "foo fighter" <lopiuh@gmx.net> - 2017-01-07 22:00 +0100
  Re: Bash different behaviour of read / strings in jessie versus stretch (regression?) Greg Wooledge <wooledg@eeg.ccf.org> - 2017-01-09 15:00 +0100
    Aw: Re: Bash different behaviour of read / strings in jessie versus  stretch (regression?) "foo fighter" <lopiuh@gmx.net> - 2017-01-10 01:20 +0100
      Re: Re: Bash different behaviour of read / strings in jessie versus stretch (regression?) Greg Wooledge <wooledg@eeg.ccf.org> - 2017-01-10 14:40 +0100

csiph-web