Solved

Cause echo to embed CR/LF?

Posted on 2004-08-31
10
1,172 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

910 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

22 Experts available now in Live!

Get 1:1 Help Now