Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 3
    please note that : 1) you should replace echo -n "something" (shell dependant, and OS dependent) with : printf "%s" "something" (the portable way. ) see unix.stackexchange.com/a/65819/27616 : And 2) if you intend to pipe to another command, if that command expect a TEXT, a (last) line without a terminating "\n" is often not considered valid and will be discarded... ex: printf "a\nb\nc\n" | wc -l # 3 lines, 3 words, 6 chars printf "a\nb\nc" | wc # 2 lines, 3 words, 5 chars! , ie wc -l doesn't count the last line, even though it has characters on it! Commented Sep 21, 2020 at 12:20
  • It doesn't make sense to talk of "sending" or "receiving" end-of-file. It's a condition, not some kind of data. Commented Sep 22, 2021 at 7:33