Newsgroups: comp.unix.shell Path: utzoo!censor!geac!itcyyz!xrtll!silver From: silver@xrtll.uucp (Hi Ho Silver) Subject: Re: /usr/spool/mail filter/editor? Reply-To: silver@xrtll.UUCP (Hi Ho Silver) Organization: Yeah, right. Date: Sat, 19 Jan 91 20:09:57 GMT Message-ID: <1991Jan19.200957.7528@xrtll.uucp> References: <1991Jan16.185727.15843@en.ecn.purdue.edu> In comp.unix.shell, nichols@en.ecn.purdue.edu (Scott P Nichols) typed: $I am interested in a shell script that will, upon execution, view $the contents of the /usr/spool/mail/lname file and remove any mail $from a certain user or list of users. I'm sure it has been done $many times, but I don't have the skills yet to write it on my own. Depending on your mailer, the easiest way to do this may well be simply to run mail -u lname with the following redirected to its input: d whoever-is-to-be-deleted q The dumb mailer that comes with Xenix, for example, allows you to delete messages from a person as above. Heck, if you wanted to, you could even put it into a here document and make about a four-line shell script out of it. -- __ __ _ | ...!nexus.yorku.edu!xrtll!silver | always (__ | | | | |_ |_) >----------------------------------< searching __) | |_ \/ |__ | \ | if you don't like my posts, type | for _____________________/ find / -print|xargs cat|compress | SNTF