Hey, cool!
The line if [ ! -z "${1##*.src.rpm}" ] && [ ! -z "${1##*.srpm}" ] works perfect, and
it got rid of the echoing "Terminated" too!
Thanks a ton dude :-)
At 03:17 PM 2/15/2001 -0800, you wrote:
>On Thu, 15 Feb 2001, Jonathan Wilson wrote:
>
>
>> if [ "$1" != *.src.rpm ] && [ "$1" != *.srpm ]
>
>I didn't notice the above line in my previous post.
>Unfortunatly, the file globing is expanding to multiple
>arguments.
>
>You will have to use a `case' statement or other trickery.
>
>Maybe like this:
>
> if [ ! -z "${1##*.src.rpm}" ] && [ ! -z "${1##*.srpm}" ]
> then
> .
> .
> .
> .
> else
> .
> .
> .
> fi
>
>-or-
>
> case "$1" in
> (*.src.rpm | *.srpm)
> .
> .
> .
> ;;
> (*)
> .
> .
> .
> ;;
> esac
>
>
>--
>John Darrah (u05192) | Dept: N/C Programming
>Giddens Industries | Ph: (425) 353-0405 #229
>PO box 3190 | Ph: (206) 767-4212 #229
>Everett WA 98203 | Fx: (206) 764-9639
----------------------------------------------------
Jonathan Wilson
System Administrator
Cedar Creek Software
http://www.cedarcreeksoftware.com
Central Texas IT
http://www.centraltexasit.com
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list