[Top][All Lists]

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

Re: bash 3.2 match operator problem

From: Andreas Schwab
Subject: Re: bash 3.2 match operator problem
Date: Thu, 12 Oct 2006 17:27:36 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

John Gatewood Ham <address@hidden> writes:

> Thank you for your reply.
> I removed the quotes and the script crashes.  There must be more
> required to convert my code and I hope someone will help.  It is
> only 1 line, and once I know the new rules I can convert everything
> else on my own.  I get this when just removing teh quotes on the
> right hand side:
> testcase running under 3.2.0(2)-release
> testcase: line 6: unexpected argument `(' to conditional binary operator
> testcase: line 6: syntax error near `(['
> testcase: line 6: `[[ "${OLDCANDIDATE}" =~ 
> ([^-]+)-([^-]+)-([^-]+)-0*([1-9][0-9]*)\.tgz ]]'

Parens are special inside [[ ]], you need to quote them.


Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

reply via email to

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