Vi isn't nasty enough, so user looses lines
Jeff Anton
anton at ucbvax.ARPA
Fri Aug 23 14:42:29 AEST 1985
In article <2073 at ukma.UUCP> david at ukma.UUCP (David Herron, NPR Lover) writes:
>Problem: Vi allows users to :wq without comment when they've
> deleted part of the file and written it to something else.
> This can result in lost files and confused novices.
>
>Repeat-by: Edit a file. Delete part of the file. (dG) Write
> the result to another file (:w junk). Exit by either
> typing :wq or ZZ. Notice that the original is shorter.
> Find backup tape.
>
>Fix: Add more nastiness to vi.
And you did not expect this? The command ':wq' means WRITE and quit.
The command 'ZZ' or ':x' means write if the file has been changed
and not written anywhere and then exit. Vi is nasty enough thank you.
Glad to help a confused professionnal. At least he loves NPR.
--
C knows no bounds.
Jeff Anton
U.C.Berkeley
ucbvax!anton
anton at berkeley.ARPA
More information about the Net.bugs
mailing list