toggle menu
Icrontic
Categories
Discussions
Best of Icrontic
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Activity
Best of Icrontic
Sign In
·
Register
×
Home
›
Nerdery
Discussion
Help with DOS echo command
Title
Author
Category
(All)
Announcements
Gaming
Team Fortress 2
World of Warcraft
Minecraft
Backlog of Shame
Nerdery
Hardware
Software
Movies & TV
Lifestyle
Music
Fashion
Food & Drink
Fitness
Home & Auto
Community
Events
Trading Post
Folding@Home
search subcategories
search archived
Tags
What to search
discussions
comments
polls
Date within
1 day
3 days
1 week
2 weeks
1 month
2 months
6 months
1 year
of
Examples: Monday, today, last week, Mar 26, 3/26/04
Search
Help with DOS echo command
t1rhino
Toronto
August 2003
edited August 2003
in
Nerdery
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
???
0
Comments
hypermood
Smyrna, GA
New
August 2003
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.
0
kanezfan
sunny south florida
Icrontian
August 2003
edited August 2003
yeah i don't think dos works with \n, it's not compiled like in C/C++
0
Sign In
or
Register
to comment.
Comments
echo hello > test.txt
echo. >> test.txt
echo world >> test.txt
Hope this helps.