John Gatewood Ham <zappaman@buraphalinux.org> 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 the 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.