Path: csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail From: Greg Wooledge 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: References: <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 To: Linda Walsh 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11645 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.