Lyall Pearce <ly...@the-pearces.com> writes: > Repeat-By: > > basePic="(2008-04)" > if [ "${basePic:0:1}" = '(' -a "${basePic:4:1}" = ')' ] > then > echo "Got brackets" > fi case $basePic in "("???")"*) echo "Got brackets";; esac
> Fix: > Unsure, I think the bracket parsing should not be treated as > expression delimiters if they are enclosed in quotes? The quotes are irrelevant for the test builtin, they are already eaten by the parser. > If they are bare, then treat as (brackets), if enclosed in quotes, > treat as "data". Bare parens would be a syntax error, since they are part of the shell grammar. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."