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

RE: [rhelv5-list] Regular Expressions on RHEL 5



What it IS doing is sending stderr to stdout and then sending stdout to
the bit bucket. So, you are ONLY seeing the error output of this
command. In this case, its must be what you want - you only care when
there is an error.

Kevin

-----Original Message-----
From: rhelv5-list-bounces redhat com
[mailto:rhelv5-list-bounces redhat com] On Behalf Of Ian Lists
Sent: Thursday, December 27, 2007 1:11 PM
To: Red Hat Enterprise Linux 5 (Tikanga) discussion mailing-list
Subject: Re: [rhelv5-list] Regular Expressions on RHEL 5

I know it doesn't look right but it works.


----- "John Summerfield" <debian herakles homelinux org> wrote:
> Ian Lists wrote:
> > It's just a script to download email address to populate my relay
> recipient map for postfix.  It's not pretty and I'm definitely not a
> shell scripter but it seems to work. 
> >   
> 
> Since you now have it working, it seems I was chasing a red herring,
> but 
> I'd still like you to answer the question, "What do you think the 
> redirection does?"
> 
> > 
> > #!/bin/bash
> > #-----------------------------------------------------------------
> > #
> > # Script for download and updating Relay Recipients...
> > 
> > # Working directory
> > WDIR=/etc/postfix
> > # URL of file to be downloaded
> > URL=https://myservername/mail/
> > # Filename of file to be worked with
> > FNAME=relay_recipients
> > WGETOPTS=" -N --no-check-certificate"
> > set -o errexit
> > 
> > cd $WDIR
> > wget $WGETOPTS ${URL}/${FNAME} 2>&1 >/dev/null | egrep -q '[Nn]ot
> (retrieving|Found)' && exit
> but what do you think this does  ^^^^^^^^^^^^^^^
> 
> > postmap $FNAME
> > logger -p mail.info -t UPDATED.POSTFIX Relay Recipients Map
> > exit 0
> > 
> > 
> > 
> > Ian
> 
> 
> 
> -- 
> 
> Cheers
> John
> 
> -- spambait
> 1aaaaaaa coco merseine nu  Z1aaaaaaa coco merseine nu
> -- Advice
> http://webfoot.com/advice/email.top.php
> http://www.catb.org/~esr/faqs/smart-questions.html
> http://support.microsoft.com/kb/555375
> 
> You cannot reply off-list:-)
> 
> _______________________________________________
> rhelv5-list mailing list
> rhelv5-list redhat com
> https://www.redhat.com/mailman/listinfo/rhelv5-list

_______________________________________________
rhelv5-list mailing list
rhelv5-list redhat com
https://www.redhat.com/mailman/listinfo/rhelv5-list


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