Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: Ulrich Mueller <ulm@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: Sun, 20 Dec 2015 09:16:45
Message-Id: 20151220101611.7113dcd5.mgorny@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] readme.gentoo-r1.eclass: Do not inherit eutils. by Ulrich Mueller
1 On Sun, 20 Dec 2015 00:56:39 +0100
2 Ulrich Mueller <ulm@g.o> wrote:
3
4 > >>>>> On Sat, 19 Dec 2015, Michał Górny wrote:
5 >
6 > >> set -f
7 > >> echo -e ${DOC_CONTENTS} | ...
8 > >>
9 > >> versus:
10 > >>
11 > >> read -d '' -r -a DOC_CONTENTS <<<"${DOC_CONTENTS}"
12 > >> echo -e "${DOC_CONTENTS[*]}" | ...
13 > >>
14 > >> The second one is (IMHO) harder to understand, less efficient, and
15 > >> relies on undocumented behaviour.
16 >
17 > > On WHAT?!
18 >
19 > Documentation of the read command doesn't specify behaviour for an
20 > empty argument of the -d option:
21 >
22 > `-d DELIM'
23 > The first character of DELIM is used to terminate the input
24 > line, rather than newline.
25
26 Feel free to use $'\0' if that makes it more explicit for you.
27
28 --
29 Best regards,
30 Michał Górny
31 <http://dev.gentoo.org/~mgorny/>

Replies