The last assignment added toreadmbox
a new version of the order command. This assignment adds toreadmbox
a new version of the delete command.
The delete command deletes messages from the message list. Currently, the delete command has two forms:to delete messages containingdelete
label wordword
in header fields, anddeleteto restore the deleted messages, if any, to the message list. In this assignment you'll add a third format for the delete command.The new delete command format is
where op indicates eitherdelete
word op wordand
oror
.The sequence word1
and
word2 corresponds to any message that has both word1 and word2 in its header. The two words do not have to appear in the same field, they just have to appear in the header. The commanddeletes all messages that have both word1 and word2 in their header. For example, the commanddelete
word1and
word2would delete the messagedelete money and bulk
but not the messageSubject: Make money fast. Priority: bulk blah blah blahbecause the message header contains neither "money" nor "bulk"Subject: Make body fast. Priority: spam Too skinny? Add bulk in minutes with very little money blah blah blahThe sequence word1
or
word2 corresponds to any message that has either word1 and word2 in its header. The two words do not have to appear in the same field, they just have to appear in the header. The commanddeletes all messages that have either word1 and word2 in their header.delete
word1or
word2The delete command doesn't change when it has zero or two arguments; this assignment just adds a new behavior when the delete command has three arguments.
This page last modified on 1 August 2000.