On Thu, Oct 31, 2013 at 03:15:52PM +0100, Han Boetes wrote:

> I ran into weird behaviour which was triggered by a recent version of
> the emacs build system. This small scriplet is the minimal case which
> triggers it as well. You can replace the 5 with any other letter or
> number. The funny thing is the -~ which I wouldn't expect to match.
> 
> #!/bin/sh                                                                     
>                                                                               
>                  
> case "foobar" in
>   *[5~-]*) echo "Of course I don't match." ;;
> esac

Here you specify the individual chars 5, ~ and -

> 
> case "foobar" in
>   *[5-~]*) echo "Why do I match now?" ;;
> esac
> 
> What is going on here?

You specify the range 5 ... ~, which includes all letters. See ascii(5).
> 
> 
> # Han

        -Otto

Reply via email to