[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Wish last item: allow + as separate argument

From: Igor Sobrado
Subject: Re: [Nmh-workers] Wish last item: allow + as separate argument
Date: Tue, 27 Dec 2005 19:25:00 +0100

In message <address@hidden>, Norman Shapiro writes:
> It would be nice to allow "+ folder" to mean "+folder". This would make it 
> easier
> to use shell wild cards in scripts and to use argument completion in 
> interactive
> shells.
> The only downside I can think of is breaking scripts that depend on the
> undocumented feature that an unadorned plus sign represents the mail 
> directory. I
> don't know if there are any scripts out there that use that feature.

Don't know if it is the example script your are looking for.  I am using
this shell script to remove old email from my Mail directory:

# $Id: purge,v 2004/08/06 08:32:51 sobrado Rel $
# Expunges deleted messages from the MH(1)/nmh(1) folders.  Messages must be
# previously removed by renaming the message files with preceding commas.


while [ $# -gt 0 ]; do
        case "$1" in
        +*)     folder="$1"
        -after) time="$2"

find `mhpath ${folder:-+}` -name ",*" -type f -mtime +${time:-7} -exec rm {} \;

I suppose that this script will be compatible with the change you propose,
but I cannot be sure.

Best regards!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]