The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
CHAR Array - stuffed with values - with more size than it holds dhanamurthy High Level Programming 3 02-14-2008 06:31 PM
Help finding/adding up file size... Stove13 UNIX for Dummies Questions & Answers 1 02-13-2008 02:26 AM
size of char array in c phani_sree High Level Programming 6 10-25-2007 04:19 AM
finding duplicate files by size and finding pattern matching and its count jerome Sukumar Shell Programming and Scripting 2 12-01-2006 04:20 AM
size of a char devices guenter High Level Programming 2 01-28-2005 07:26 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-14-2006
HariRaju HariRaju is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 3
Finding EOL char is there or not in a big size file

Hi,

I am using ksh.

I have to find wether data file has EOL or not. as per my knowledge we can easily find by checking each character. But this is a tedious job as per my requirement because my data file size is very big . It may be in 25-30 MB.
So please advice me how i can check wether data file has EOL or not.

Thanks in advance
  #2 (permalink)  
Old 06-14-2006
vanackpt vanackpt is offline
Registered User
  
 

Join Date: Jun 2006
Location: Belgium
Posts: 7
Quote:
Originally Posted by HariRaju
Hi,

I am using ksh.

I have to find wether data file has EOL or not. as per my knowledge we can easily find by checking each character. But this is a tedious job as per my requirement because my data file size is very big . It may be in 25-30 MB.
So please advice me how i can check wether data file has EOL or not.

Thanks in advance
If you want to check every line, you gonne have to parse the whole file,
or do you only want to check the first or last line ?
  #3 (permalink)  
Old 06-14-2006
HariRaju HariRaju is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 3
i only want to check end of line
  #4 (permalink)  
Old 06-14-2006
vanackpt vanackpt is offline
Registered User
  
 

Join Date: Jun 2006
Location: Belgium
Posts: 7
I think you mix two things.
There is a EOL at the end of each line and there is something like EOF (end of file).
As far as i understand, you mean the EOF character, is this so ?
  #5 (permalink)  
Old 06-14-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,759
grep -q 'character goes here' bigfile

Unix doesn't have an EOF character, and EOF condition for a file, yes.
EOL can mean a newline \n - but since the OP asked for EOL instead of newline, I don't know what is meant. I guess '\n'
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0