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


Groups > gnu.bash.bug > #11645

Re: read and env variables + POSIX => SEGFAULT

Path csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail
From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: read and env variables + POSIX => SEGFAULT
Date Tue, 13 Oct 2015 08:11:30 -0400
Lines 17
Approved bug-bash@gnu.org
Message-ID <mailman.225.1444738342.7904.bug-bash@gnu.org> (permalink)
References <CAAZkfoJuwe4o1rPQrfB-vxqeAaBX-=9NPWgv2uiOPdHq7L8g+g@mail.gmail.com> <5619D0F1.6080904@tlinx.org> <561C2097.5080808@case.edu> <561C4456.9020308@tlinx.org> <561C44C1.9000004@tlinx.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1444738343 20713 208.118.235.17 (13 Oct 2015 12:12:23 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash <bug-bash@gnu.org>
To Linda Walsh <bash@tlinx.org>
Envelope-to bug-bash@gnu.org
Content-Disposition inline
In-Reply-To <561C44C1.9000004@tlinx.org>
User-Agent Mutt/1.4.2.3i
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From 139.137.100.1
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11645

Show key headers only | View raw


On Mon, Oct 12, 2015 at 04:39:45PM -0700, Linda Walsh wrote:
> I wasn't sure if it put the "\n" at the end in a 1-line example.

<< and <<< always end with a trailing newline.  This is 100% unavoidable
with that syntax.  If your data stream needs NOT to end with a newline,
then you have to use < <(printf ...).

> Does it also use a tmp file and use process-substitution, or is
> that only when parens are present?

Yes, <<< uses a temp file just like << does.

wooledg@wooledg:~$ (sleep 1; ls -l /dev/fd/0; sleep 10) <<< "a temp string"
lr-x------ 1 wooledg wooledg 64 Oct 13 08:09 /dev/fd/0 -> /tmp/sh-thd-1033352477 (deleted)

One that is opened and then unlinked, as it turns out.

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: read and env variables + POSIX => SEGFAULT Greg Wooledge <wooledg@eeg.ccf.org> - 2015-10-13 08:11 -0400

csiph-web