Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o, Pacho Ramos <pacho@g.o>
Subject: Re: [gentoo-dev] [PATCH] readme.gentoo-r1.eclass: Do not inherit eutils.
Date: Sat, 19 Dec 2015 20:17:41
Message-Id: 22133.47958.733949.746288@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-dev] [PATCH] readme.gentoo-r1.eclass: Do not inherit eutils. by "Michał Górny"
1 >>>>> On Sat, 19 Dec 2015, Michał Górny wrote:
2
3 > read -d '' -r -a DOC_CONTENTS <<<"${DOC_CONTENTS}"
4
5 > This performs word splitting into an array. Then you can do:
6
7 > echo -e "${DOC_CONTENTS[*]}" | ...
8
9 The first line fails for me:
10
11 $ DOC_CONTENTS="test"
12 $ read -d '' -r -a DOC_CONTENTS <<<"${DOC_CONTENTS}"
13 $ echo $?
14 1
15
16 (I guess it is encountering EOF on the temporary file created by the
17 string redirection, but how would one distinguish this from other
18 errors?)
19
20 Besides, it is hard to understand what this code does, as compared to
21 the "set -f" solution.
22
23 Ulrich

Replies