Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!rutgers!mcnc!duke!khera From: khera@thneed.cs.duke.edu (Vick Khera) Newsgroups: comp.mail.mh Subject: Re: Using Unseen to check for new mail Message-ID: Date: 8 Mar 91 13:59:02 GMT References: Sender: news@duke.cs.duke.edu Distribution: comp Organization: Duke University CS Dept., Durham, NC Lines: 28 Nntp-Posting-Host: thneed.cs.duke.edu In-reply-to: appel@ocf.Berkeley.EDU's message of 7 Mar 91 16:43:37 GMT In article appel@ocf.Berkeley.EDU (Shannon D. Appel) writes: question is, is there any nice way to do something like this: if (YOU_HAVE_UNSEEN_MAIL_IN_FOLDER_X) then ... i use the following shell script which i call usmail (for unseen mail) ---cut here--- #!/bin/csh -f # V. Khera # print out listing of unseen mail in mh folder +inbox # $Id: usmail.csh,v 1.1 90/11/15 17:36:24 khera Exp $ set foo = `mark +inbox -list -sequence unseen` if ("$foo[2]" != "(null)") then echo "Unseen mail (inbox):" scan unseen else echo "No unseen mail in inbox." endif ---cut here--- -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vick Khera, Gradual Student/Systems Guy Department of Computer Science ARPA: khera@cs.duke.edu Duke University UUCP: ...!mcnc!duke!khera Durham, NC 27706 (919) 660-6528