help-bash
[Top][All Lists]
Advanced

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

Re: case insensitivity for some branch in the case statement


From: Eric Blake
Subject: Re: case insensitivity for some branch in the case statement
Date: Fri, 1 Nov 2019 21:29:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 11/1/19 8:12 PM, Peng Yu wrote:
Hi,

I'd like to make some case-statement branch comparison
case-insensitive but not all. Is it possible with bash? Thanks.

case $foo in
  [aA][bB][cC]) # This branch is case-insensitive
    ;;
  bCd)  # This branch is case-sensitive
    ;;
esac

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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