Quote:
Originally Posted by palanisvr
Try this :
##--NOn interactive deletion of lines using vi- editor
vi - a.txt <<END
:11d
:12d
:x
END
##the above code will delete 11th and 42nd line , saves the file and exits
dump the above code in a script and execute it ...
you can also achive the same using sed but sed is a temporary one it wont make the changes permanent to the source file....
|
thats fine. how do i do it in
sed, i could pipe the changes into a new file. i prefer single line commands as i haven't mastered executing scripts yet.