Hi Albert, * Albert Chin wrote on Tue, May 17, 2005 at 11:04:33PM CEST: > On Sun, May 15, 2005 at 06:35:33AM +0200, Ralf Wildenhues wrote: > > * Albert Chin wrote on Sun, May 15, 2005 at 04:27:05AM CEST: > > > > > case "foobar" in > > > *\)*) > > > echo bar ;; > > > esac > > > > > > $ ./quote > > > + echo bar > > > bar > > > > > > I don't see an obvious workaround except for removing *\)* from the > > > case statement. > > > > Well, how about using either *")"* or *')'* as pattern? Does that work? > > Neither work.
Does the following work? pat=')' case foobar in *$pat*) echo bad;; esac case foo\\bar in *$pat*) echo bad;; esac case foo\)bar in *$pat*) ;; *) echo bad;; esac Note that you also need to check for false negatives, unfortunately. If not, let me see: This failure only causes quote.test to fail, and causes a lot of extra quotes in the libtool output, but no real failure. Is that correct? Could you mail the output of attached script? Please replace echo by an echo program which does not interpret backslashes, and the shell path with the correct one. Regards, and thanks, Ralf
#! /bin/ksh : ${echo='print -r'} for t in \\ \| \& \; \< \> \( \) \$ \` \" \' \* \? \# \~ \= \% '[' ']' \{ \} ' ' ' ' \* b do for c in '[\]' '[|]' '[&]' '[;]' '[<]' '[>]' '[(]' '[)]' '[$]' '[`]' \ '["]' "[']" '[?]' '[#]' '[~]' '[=]' '[%]' \ '[[]' '[]]' '[a^]' '[*]' '[{]' '[}]' '[ ]' '[ ]' '[*]' '[b]' \ '[\\]' '[\|]' '[\&]' '[\;]' '[\<]' '[\>]' '[\(]' '[\)]' '[\$]' '[\`]' \ '[\"]' '[\'"'"']' '[\?]' '[\#]' '[\~]' '[\=]' '[\%]' \ '[\[]' '[\]]' '[\^]' '[\*]' '[\{]' '[\}]' '[\ ]' '[\ ]' '[\*]' '[\b]' \ '\' '|' '&' ';' '<' '>' '(' ')' '$' '`' \ '"' "'" '?' '#' '~' '=' '%' \ '[' ']' '*' '{' '}' ' ' ' ' '*' 'b' \ '\\' '\|' '\&' '\;' '\<' '\>' '\(' ')' '\$' '\`' \ '\"' "\'" '\?' '\#' '\~' '\=' '\%' \ '\[' '\]' '\*' '\{' '\}' '\ ' '\ ' '\*' '\b' do case $t in $c) $echo "match: $t in $c." esac done done | tr '\t' X
_______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool