how to know whether that file has eol or noeol before opening that file in VI editor


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to know whether that file has eol or noeol before opening that file in VI editor
# 1  
Old 06-16-2006
how to know whether that file has eol or noeol before opening that file in VI editor

Hi,

I want to check whether file has EOL or NOEOL before opening this file in VI editor. My file is very big its in terms of 15-20 MB.

I am using ksh for this.

When we opened the file in vi editor, normally at last line we are able to see whether this is eol or noeol file. But i does want to check manually like this.

Please suggest me on this.
# 2  
Old 06-16-2006
try man file
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to read a file without opening the file and delete last line?

I have file called "text". The contents are as below : aaa bbb ccc ddd eee ffff ddd hhhh iiii I want to read this file without opening and and delete the last line. How can it be done? (4 Replies)
Discussion started by: the_hunter
4 Replies

2. AIX

Opening a file in vi editor is giving out of memory error

Below is the error: Out of memory saving lines for undo - try using ed : Please help me how do I open this file. Best regards, Vishal (5 Replies)
Discussion started by: Vishal_dba
5 Replies

3. Shell Programming and Scripting

Opening a file in vi and automatically save and quit this file using shell script

Hi friends, In my shell script, I want to open a file using vi editor. After opening the file in vi, I want to save and quit this file automatically.... all through shell script. the code segment is: ------------------------------------------------------------ cd ~/netfpga/projects/scone/sw/... (2 Replies)
Discussion started by: sachinteotia
2 Replies

4. OS X (Apple)

No eol in swap file

I was editing a file with vi and crashed so when I opened the file again I had the .swp file to deal with. I made the wrong choice trying to recover my file and wound up with a file with no eol (end of line) characters. I have forgotten the code to substitute and don't want to make an even... (2 Replies)
Discussion started by: gale
2 Replies

5. Shell Programming and Scripting

Xmllint - Xml-file problem --ods file not opening

Dear All, this is my first post on this Forum, glad to be here. I'm trying to fix an .ods file. Yes, I had a backup, but it's also corrupted. When opening the document I get this EM: read error format error discovered in the file in sub-document content.xml at 2,337040(row,col). So I... (3 Replies)
Discussion started by: jameslast
3 Replies

6. UNIX for Dummies Questions & Answers

Check header of file, without opening the file

if we happen to have a very big .csv file we cannot or dont care to edit, is there a way to check if the file contains a header row? (2 Replies)
Discussion started by: lydiaflamp
2 Replies

7. Shell Programming and Scripting

Trouble reading [noeol] file

cat can't show the last line of a file sftp transffered from Windows, because the last line is not ended with new line. Vi can show all line with warning I can append blank line in order for cat to show all lines, But is there a command to do this without modifying the file? > cat -A... (3 Replies)
Discussion started by: honglus
3 Replies

8. Shell Programming and Scripting

Lookup value in file and Append new value at EOL

Hi All, I am new to shell scripting but have successfully created some of my own scripts using awk and sed. However, I have come across a problem that I cannot solve on my own and have not been able to find a good example that relates to what I am trying to do. What I need is for the... (4 Replies)
Discussion started by: kixazz2529
4 Replies

9. Shell Programming and Scripting

Deleting lines inside a file without opening the file

Hi, Just consider there are around 10 lines in a file. Now is it possible to delete the first 2 lines in the file without opening the file. No matter whatever the content of the file is, I just wanna delete the first 2 lines without opening the file. Is that possible? If so, please help me out.... (3 Replies)
Discussion started by: toms
3 Replies

10. Shell Programming and Scripting

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... (4 Replies)
Discussion started by: HariRaju
4 Replies
Login or Register to Ask a Question