helpThe GNU Bourne-Again SHell - Support: sr #108752, Here strings appends newline


sr #108752: Here strings appends newline

Submitted by:  None
Submitted on:  Thu 19 Feb 2015 09:56:25 PM UTC  
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: Done
Privacy: PublicAssigned to: None
Originator Email: -unavailable-Open/Closed: Open
Operating System: GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 22 Feb 2015 10:22:30 PM UTC, comment #1:

This bug should be closed. No bugs have ever been closed, and none of the bugs have been assigned or accepted. So I sent the body to bug-bash instead, and got an ack. I don't know how to close this bug, probably some admin needs to.

Håkon Hallingstad <hakon>
Thu 19 Feb 2015 09:56:25 PM UTC, original submission:

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 is best if you guys apply the below patch and do the 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"
The redirection operator



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by chet (Updated the item)
  • -unavailable- added by hakon (Posted a comment)
  • -unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 13 Nov 2015 04:11:58 PM UTCchetStatusNone=>Done

    Back to the top

    Powered by Savane 3.1-cleanup1