Re: carriage returns in HERE statements



On Feb 26, 10:28 am, "bdz" <bdalz...@xxxxxxx> wrote:

That is the carriage returns not marked by \n in the script are
printing to the terminal as carriage returns

You typed the program output (and made three typoos in the process) -
please don't do that. cut-and-paste instead.

Your program is apparently producing the correct output (we don't know
for sure, since you typed the output instead of cut-and-paste). When
you use a heredoc, every single character is included (including any
newlines that you put in the text by way of hitting your ENTER key).
If you terminate a line with a \n you get two newlines - one that you
included by hitting ENTER and one that you included by typing \n.

If you saw different behavior from another program it's probably
because $\ had been redefined.

--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)

.



Relevant Pages

  • Re: canonical text files
    ... Line separators should separate not terminate ... A trailing comma may appear after the last expression in an array ... Commas are not newlines. ... There is absolutely no formal language or documentation any sort whatsoever anywhere in the Java universe that specifies this one way or the other, ...
    (comp.lang.java.help)
  • Re: [opensuse] anyone using cromfs?
    ... exception - "terminate called after throwing an instance ... error message, it's not a memory problem either. ... I was running on a 32bit system and hitting the 3Gb per ...
    (SuSE)
  • Re: 16 Bit Subsystem Error
    ... got the same command prompt line "C:\Documents and Setting\Owner>" right ... after hitting enter. ... > | terminate the application. ... > | Can't run or install any older programs, which is doubly painful since I ...
    (microsoft.public.windowsxp.general)
  • Re: Cant open Adobe pdf file.
    ... doesn't terminate its process though you exit. ... You may need to kill ... process by hitting ctrl+alt+del. ...
    (microsoft.public.windowsxp.general)
  • Does Java support shutdown code when program is killed?
    ... I want my program to print something when I terminate it by hitting ... control-C. ... How do you do this in Java? ...
    (comp.lang.java.programmer)