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....