this should work as well: CYRUSUSER=` /bin/echo "$CYRUSUSER" | /usr/bin/tr A-Z a-z`
On Tue, 2002-07-09 at 21:17, Nick Rout wrote: > I am forwarding Andre's message as acknowledgement of his help (he has > some problem posting to the list) and also advising for posterity that > the answer was like this: > > CYRUSUSER2=` /bin/echo "$CYRUSUSER" | /usr/bin/tr A-Z a-z` > CYRUSUSER="$CYRUSUSER2" > > (note the back ticks ` ) > > which started from Andre's solution (which didn't quite work) and after > a bit of bashing and reading of different procmail faqs, worked out ok. > > For interest, if procmail failed, it delivered to the file /var/spool/mail/cyrus. > Its interesting to note that I've found a few lost emails (addressed to > NICK, Nick, etc). Bummer. > > Thanks also to Jim for his post, which (if I hadn't fixed it already) > would have been helpful. > > Forwarded by Nick Rout <[EMAIL PROTECTED]> > ----------------------- Original Message ----------------------- > From: "Andre Renaud" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Date: Tue, 9 Jul 2002 15:02:15 +1200 (NZST) > Subject: Re: procmail variable assignment > ---- > > > > Can i do something at the head of the procmail.global file to change > > $CYRUSUSER to all lowercase, like (in pseudocode) > > CYRUSUSER=lowercase($CYRUSYSER) -- > > try > CYRUSUSER2=| echo "$CYRUSUSER" | tr A-Z a-z > CYRUSUSER="$CYRUSUSER2" > > Unfortunately you have to use two variables (from the mini-FAQ): > Variable capture clobbers variable's old value > I.e. the following doesn't work as expected: > > :0 > variable=| echo "$variable" | tr A-Z a-z > > The value of variable will be empty by the time the echo executes. > > Hope this helps, > Andre > > PS. I haven't posted this to the list, it screws with my emails. > > > > > --------------------- Original Message Ends -------------------- > > -- > Nick Rout <[EMAIL PROTECTED]> >
