Solved

Cause echo to embed CR/LF?

Posted on 2004-08-31
10
1,192 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

726 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