The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cpio versus cp fredao UNIX for Advanced & Expert Users 1 09-17-2007 11:05 AM
Mac versus PCs - the CIO verdict - Silicon.com iBot UNIX and Linux RSS News 0 07-13-2007 09:50 PM
AIX versus Networks rawatmohinder AIX 5 05-23-2006 02:54 AM
CTRL+H versus ^? versus BACKSPACE alan UNIX for Dummies Questions & Answers 3 07-23-2003 10:08 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-20-2005
Registered User
 

Join Date: Feb 2005
Location: Columbus OH
Posts: 133
<LF> versus <CR>/<LF>

Hello,

Can someone explain how to distinguish a LF character and a CR/LF character in a text file from a shell script.

Thanks

Last edited by jerardfjay; 10-20-2005 at 10:27 AM. Reason: question was incorrect (changed CR to LF)
Reply With Quote
Forum Sponsor
  #2  
Old 10-20-2005
vertigo23's Avatar
Registered User
 

Join Date: Jul 2005
Location: SF, CA
Posts: 67
If you have GNU File installed, it will tell you in a nice human readable output.

Code:
$ file test.txt
test.txt: ASCII text
$ vi test.txt     # :set ff=dos
$ file test.txt
test.txt: ASCII text, with CRLF line terminators
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:01 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0