Newline character produced by `echo`, is it always there without using any option on virtually all systems? ...

My mentor says to set image to Fine instead of RAW — how is this different from JPG?

Is it dangerous to install hacking tools on my private linux machine?

Does the Mueller report show a conspiracy between Russia and the Trump Campaign?

RSA find public exponent

In musical terms, what properties are varied by the human voice to produce different words / syllables?

"klopfte jemand" or "jemand klopfte"?

Why does electrolysis of aqueous concentrated sodium bromide produce bromine at the anode?

Why weren't discrete x86 CPUs ever used in game hardware?

Putting class ranking in CV, but against dept guidelines

what is the log of the PDF for a Normal Distribution?

Special flights

Why not send Voyager 3 and 4 following up the paths taken by Voyager 1 and 2 to re-transmit signals of later as they fly away from Earth?

What are the main differences between the original Stargate SG-1 and the Final Cut edition?

A `coordinate` command ignored

How many time has Arya actually used Needle?

What would you call this weird metallic apparatus that allows you to lift people?

Project Euler #1 in C++

After Sam didn't return home in the end, were he and Al still friends?

How were pictures turned from film to a big picture in a picture frame before digital scanning?

Can an iPhone 7 be made to function as a NFC Tag?

Asymptotics question

If Windows 7 doesn't support WSL, then what is "Subsystem for UNIX-based Applications"?

How does light 'choose' between wave and particle behaviour?

White walkers, cemeteries and wights



Newline character produced by `echo`, is it always there without using any option on virtually all systems?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionWhy is printf better than echo?Replace all occurrences of a character in a variable using korn scriptIs there any alternative to echo daemon to display ip?Using 'grep' to find lines that contain all of three specified characters in any orderusing ! character in echoHow to put a newline special character into a file using the echo command and redirection operator?Is there any method to edit a text file without opening it?How to add all the numbers of a specific column in UNIX without using awk command?Why echo command does not need “-e” option when escaping “$” character with a backslashSplit single line into multiple lines, Newline character missing for all the lines in input fileWhen using sed regex, is there a way of using punctuation in search term without actually changing it during substitution





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1

















Although I have read Stephane's answer concentrated on basically all aspects of echo vs printf, I am unsure if it also answers my question, which stands:



The newline character produced by echo, is it always there without using any option on virtually all systems?:



I have a POSIX script, where the relevant part is:



printf 'n'; printf 'n' >&2


And I ask myself, do I need to stick with printf in this case too?



It could look better:



echo; echo >&2


But I am no expert, so I'm unsure.









share































    1

















    Although I have read Stephane's answer concentrated on basically all aspects of echo vs printf, I am unsure if it also answers my question, which stands:



    The newline character produced by echo, is it always there without using any option on virtually all systems?:



    I have a POSIX script, where the relevant part is:



    printf 'n'; printf 'n' >&2


    And I ask myself, do I need to stick with printf in this case too?



    It could look better:



    echo; echo >&2


    But I am no expert, so I'm unsure.









    share



























      1












      1








      1










      Although I have read Stephane's answer concentrated on basically all aspects of echo vs printf, I am unsure if it also answers my question, which stands:



      The newline character produced by echo, is it always there without using any option on virtually all systems?:



      I have a POSIX script, where the relevant part is:



      printf 'n'; printf 'n' >&2


      And I ask myself, do I need to stick with printf in this case too?



      It could look better:



      echo; echo >&2


      But I am no expert, so I'm unsure.









      share


















      Although I have read Stephane's answer concentrated on basically all aspects of echo vs printf, I am unsure if it also answers my question, which stands:



      The newline character produced by echo, is it always there without using any option on virtually all systems?:



      I have a POSIX script, where the relevant part is:



      printf 'n'; printf 'n' >&2


      And I ask myself, do I need to stick with printf in this case too?



      It could look better:



      echo; echo >&2


      But I am no expert, so I'm unsure.







      text-processing echo newlines printf





      share














      share












      share



      share








      edited 1 min ago









      Jeff Schaller

      45.1k1164147




      45.1k1164147










      asked 7 mins ago









      VlastimilVlastimil

      8,6801667150




      8,6801667150






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f513616%2fnewline-character-produced-by-echo-is-it-always-there-without-using-any-optio%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f513616%2fnewline-character-produced-by-echo-is-it-always-there-without-using-any-optio%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...