Hello,
I'm new to scripting, I have a file test.dat. I want to make changes to it with out openning it.
Example: test.dat has rows, and I want to change value "LA" to "TX" without opening it or without writing it to another file.
Is it possible?
Thanks (9 Replies)
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... (1 Reply)
Hi, this is such a simple question (I think), but I don't know the answer, obviously. If I'm using the terminal, and I'm remotely logged on to another computer, and I'm in my directory on that computer, what command would I use to...open a file? For example, a .exe file, or a .txt file...all I want... (6 Replies)
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)
Hi,
I have written a function which will open the file with the input name provided.Input name is in string format so while opening I am converting it using c_str().detail code below Plz let me know what is the wrong in code.
1 #include<iostream>
2 #include<fstream>
3 ... (4 Replies)
Hello All,
I am new to programming in unix.
I am trying to create a file by using open command. The entire file is :
#include<fcntl.h>
main(void){
int fd;
fd = open("File1", O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR|S_IRWXO);
printf("%d ", fd);
}
The problem I am facing a strange problem.... (2 Replies)
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)
I am zipping a file in unix and then sending it to windows.
buyt when i try to open it with 7zip software. it throws an error FILE IS BROKEN (3 Replies)
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)
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)