On Mon, Jan 07, 2008 at 11:34:08PM -0600, Paul Procacci wrote:
> Is this what you mean?
> 
> ---------------------
> #!/bin/sh
> 
> STRING="mystring.gz"
> 
> if [ ".gz" = "`echo \"$STRING\" | sed -n 's/.*\(\.gz\)$/\1/p'`" ]; then
>  echo test;
> fi
> 
> -----------------------
> 
> ~Paul
> 

        Sorry.  You get the credit for the predicate expression; Jon had the 
        simpler 
        (and more readable:) one.    But yours is warm+fuzzy in it's cleverness
        :-)

        gary



-- 
Gary Kline  Seattle BSD Users' Group (seabug)      | [EMAIL PROTECTED]
            Thought Unlimited Org's Alternate Email Site
            http://www.magnesium.net/~kline
   To live is not a necessity; but to live honorably...is a necessity. -Kant

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to