Typing
qends the session, but only if no changes have been made in the buffer since the last write to the file. This is to remind the user that perhaps the changes made should be saved. In this case, ed comes back with
If q is entered a second time, the command will then be executed. Changes since the last write will not be saved, and the user will return to the calling shell.![]()