A collection of questions and answers about Vi.
You were editing a file without a name atQ: How is this mail generated? What is the mechanism behind this?on the machine ``zucchini'' when the editor was killed. Since the file had no name, it has been named "LOST". You can retrieve most of your changes to this file using the "recover" command of the editor. An easy way to do this is to give the command "vi -r ". This method also works using "ex" and "edit".
A: Jim Gottlieb (jimmy@info.com): "... when vi gets a HUP signal, it dumps its buffer, in some special format, to the program /usr/lib/expreserve ..."
Workaround with Perl:
perl -ne 'print unless $seen{$_}++'More scripts in awk, sed, or perl are welcome, too!