Solved

Cause echo to embed CR/LF?

Posted on 2004-08-31
10
1,177 Views
Last Modified: 2013-11-18
When I do:

>>file.txt echo Text

It appears as though the text does not include a CR/LF...? (But, to be honest, my text editor is weak for this)

I don't want to have to use
 echo Text >>file.txt

for this application... How can I ensure that a CR/LF is embedded?

0
Comment
Question by:nummagumma2
10 Comments
 
LVL 30

Expert Comment

by:SteveGTR
ID: 11948328
I did both on my XP Pro machine at home and both acted exactly the same. When I ran debug against the resulting text file, both had this:

0B5B:0100  54 65 73 74 0D 0A

I appended more information I got:

0B5B:0100  54 65 73 74 0D 0A 54 65-73 74 20 0D 0A

What operating system are you using?

Could it be that the prior process is not putting the CR/LF? In that case the following should do the trick:

>>file.txt echo.

or

echo.>>file.txt

Good Luck,
Steve
0
 
LVL 1

Author Comment

by:nummagumma2
ID: 11948376
The only processes in question are various >> to create a logile...

I currently have it using echo.>>file.txt, but this isn't a very visually appealing solution when looked at in email...

I'm using blat.exe to email this file... and I'm thinking that the fault may lie with blat. :/



Thanks for your efforts... I'll post here if I learn more.
0
 
LVL 1

Author Comment

by:nummagumma2
ID: 11948380
Oh, sorry... I tested it on 2K and XP - same results...

I'd trust your debug tool... It's gotta be blat.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 30

Expert Comment

by:SteveGTR
ID: 11948406
I'm just DOS's debug. To use do the following:

debug test.txt
d
q

The 'd' command dumps out the file in hex. The 'q' command quits DOS.
0
 
LVL 1

Author Comment

by:nummagumma2
ID: 11948425
Learning something new everyday....
0
 
LVL 16

Expert Comment

by:glenn_1984
ID: 11948672
0
 
LVL 1

Author Comment

by:nummagumma2
ID: 11956883
Duh.

The text file does of course have CRLF in them.

blat.exe is also sending them properly to the email address.

The email program (Outlook 2002) was stripping off extra LF by default.

Stupid Outlook.  (Stupid Numma).
0
 
LVL 30

Expert Comment

by:SteveGTR
ID: 11956960
You're not alone there... I often over complicate a problem :)
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12184984
PAQed, with points refunded (500)

Computer101
E-E Admin
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to find Tomcat initial memory and Max memory through command line windows 12 197
robocopy 6 63
how to roll into all sub dirs 7 51
Randomize in Owl Carousel v1.3.2 6 40
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now