bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Here strings appends a newline


From: Håkon Hallingstad
Subject: Here strings appends a newline
Date: Sun, 22 Feb 2015 18:30:29 +0000

I noticed that here strings (<<< word) doesn't quite follow the documented behavior: "The result is supplied as a single string to the command on its standard input." Instead, or in addition, a newline is appended to the string. I therefore propose to clarify this in the man page, see below for proposal.

I tried to make -C doc, but even on a clean clone it produces a diff. Therefore, it may be best if you guys apply the below patch and run make.

Håkon Hallingstad


diff --git a/doc/bash.1 b/doc/bash.1
index ec41462..5d9bf30 100644
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -3801,8 +3801,8 @@ The \fIword\fP undergoes
brace expansion, tilde expansion, parameter and variable expansion,
command substitution, arithmetic expansion, and quote removal.
Pathname expansion and word splitting are not performed.
-The result is supplied as a single string to the command on its
-standard input.
+The result is supplied as a single string, with a newline appended,
+to the command on its standard input.
.SS "Duplicating File Descriptors"
.PP
The redirection operator

reply via email to

[Prev in Thread] Current Thread [Next in Thread]