Help with DOS echo command

t1rhinot1rhino Toronto
edited August 2003 in Science & Tech
I am trying to pipe an echo command to a text file, but how do you echo a carriage return?

echo "hello \n world" > test.txt
produces
hello \n world in test.txt.
So how do I echo it so it comes out like
hello
world

???

Comments

  • hypermoodhypermood Smyrna, GA New
    edited August 2003
    This sequence will do what you want although not in one line...

    echo hello > test.txt
    echo. >> test.txt
    echo world >> test.txt

    Hope this helps.
  • kanezfankanezfan sunny south florida Icrontian
    edited August 2003
    yeah i don't think dos works with \n, it's not compiled like in C/C++
Sign In or Register to comment.