Quote:
Originally Posted by bhargav
What type of problem you have encountered with ' vi' ?
|
The main problem i'm having with
vi is, that i understand how to open a file on specific line, the thing I don't get is how to save the changes. For example, I've been trying to do something like this.
Code:
vi +5n myfile
:i
"Insert some text"
:w
:q
As I said, it only opened editor in Insert mode.
It's probably silly me
I've tried to use
sed, and it helped, although that was the code I've found on Internet, but I don't understand completely the meaning of criterias yet.
p.s. I've managed to solve the given example using temp file, which is being an absolutely time and space consuming solution....