Subject: When INBOX empty, do nuttin'

From: [email-masked] (Lanny Finch)
Date: 7 Aug 1994 08:47:26 -0700

Question:  Is there a command-line switch on Pine which tells Pine to NOT 
go into interactive mode, ie. to return you immediately to the Unix 
prompt when the INBOX is empty?   I've read the man but can't locate 
such an option.   Sure would save me a bit of time cycling thru the 
program (and reassuring it 'yes, I REALLY REALLY want to leave Pine').

---

From: Roman Czyborra <[email-masked]>
Date: Tue, 9 Aug 1994 09:14:46 +0200

> Question: Is there a command-line switch on Pine which tells Pine to
> NOT go into interactive mode, ie. to return you immediately to the
> Unix prompt when the INBOX is empty?

Unless you must access your mailbox via IMAP you can apply the Unix
file test operator for that matter:

alias pine "[ -s $MAIL ] && \pine"

assuming MAIL would hold the pathname to your mailbox.

---

From: [email-masked] (Lucio Chiappetti)
Date: 10 Aug 1994 04:03:50 -0500

In article <[email-masked]>, [email-masked] (Lanny Finch) write:
|> Question:  Is there a command-line switch on Pine which tells Pine to NOT 
|> go into interactive mode, ie. to return you immediately to the Unix 
|> prompt when the INBOX is empty?   I've read the man but can't locate 

   I am not aware of a way in Pine.
   But you can write a shell script around it (we have one which
   tests if inbox is empty : if not empty enters pine in the inbox
   index, if empty enters pine folder list.

We get the size of inbox as (csh script) :

set dim = `ls -s /var/spool/mail/$USER`

(actualy we do an rsh in some cases according to where user's inbox
reside, but that's our local arrangement)

if ($#dim == 0) then
  set dim1 = 0
else
  set dim1 = $dim[1]
endif

After this massaging dim1 will contain 0 if inbox empty or not
existing, non-zero otherwise

-- 
---------------------------------------------------------------------------- 
       A member of  G.ASS : Group for Astronomical Software Support          
---------------------------------------------------------------------------- 
Lucio Chiappetti - IFCTR/CNR     | Ma te' vugl' da' quost avis a ti' Orsign  
via Bassini 15 - I-20133 Milano  | Buttet rabios intant te se' pisnign       
Internet: [email-masked]  |                                           
Decnet:   IFCTR::LUCIO           |             (Rabisch, II 46, 119-120)     
----------------------------------------------------------------------------

---

From: [email-masked] (Richard McMahon)
Date: 10 Aug 1994 20:40:54 GMT

>assuming MAIL would hold the pathname to your mailbox.

Can the above be modified to open an alternative folder if
inbox in empty

an alternative to $MAIL could be /var/spool/mail/$USER 

I would like pine to open my mbox where I save all messages
that have been read.

 Richard G. McMahon       |
 University of Cambridge  |  Phone(direct)      44-(0)223-337519
 Institute of Astronomy   |       (secretary)   44-(0)223-337548           
 Madingley Rd             |  FAX                44-(0)223-337523
 Cambridge                |  email(internet)   [email-masked]
 CB3 OHA                  |                      
 U K.                     |  SPAN  RLESIS(19463)::APM3(63521)::RGM
                          |

---

From: [email-masked] (Reid Cameron Conti)
Date: 10 Aug 1994 17:31:05 -0700

> program (and reassuring it 'yes, I REALLY REALLY want to leave Pine').

I don't know about the former.. But, I *DO* know that you can set it so 
that there is no y/n question when you exit.  also, because I move mail 
to other boxes often, I set pine so that it wouldn't question me on 
expunge.  Check yer .pinerc file

-- 
|-------------------------------------------------------------------------|
| [email-masked] "640K outta be enough for anybody"-Bill Gates | 
| http://gibeah.connected.com/~jazz/jazz.homepage.html | Long Live Dhall! |
\_________________________________________________________________________/

---

From: [email-masked] (Marcos Rubinstein)
Date: Wed, 17 Aug 1994 01:42:01 GMT

instead of invoking pine, call the "old" mail... (in unix)
mail will give you either a "no mail for ..." or a list of your mail...
then press "q". is much faster than pine. Sometimes I use this 
before deciding if i will use pine to read the mail...

Pucho

(I now there are scripts to give you an alert each time that you have mail,
listing from and subject, and also will give you that info at any time)

Shalom ve Tzedek
Pucho