delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/09/22:29:27

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3DCDD24D.40B5DF90@attglobal.net>
Date: Sat, 09 Nov 2002 19:28:13 -0800
From: Doug VanLeuven <roamdad AT attglobal DOT net>
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Bash 2.05b.04 - shopt extglob not working?
References: <fzua51us DOT fsf AT blue DOT sea DOT net>
X-MailScanner: Found to be clean

Try
#!/bin/bash
shopt -s extglob

"Jari Aalto+list.cygwin" wrote:
> 
>     Isn't this supposed to work under Cygwin bash? I have "shopt extglob"
>     enabled.
> 
>     Jari
> 
> a=new;
> 
> case $a in
>         -d) echo 1 ;;
> @(add|new)) echo 2 ;;
> esac
> 
> root AT W2KPICASSO:~/config/shell/bash/complete$ bash -x ~/tmp/test.sh
> + bash -x ~/tmp/test.sh
> + a=new
> /cygdrive/e/home/jaalto/tmp/t3.sh: line 5: syntax error near unexpected token `('
> /cygdrive/e/home/jaalto/tmp/t3.sh: line 5: `@(add|new)) echo 2 ;;'
> 
> root AT W2KPICASSO:~/config/shell/bash/complete$ shopt
> + shopt
> cdable_vars     off
> cdspell         off
> checkhash       off
> checkwinsize    off
> cmdhist         on
> dotglob         off
> execfail        off
> expand_aliases  on
> extglob         on
> histreedit      off
> histappend      off
> histverify      off
> hostcomplete    on
> huponexit       off
> interactive_comments    on
> lithist         off
> login_shell     off
> mailwarn        off
> no_empty_cmd_completion off
> nocaseglob      off
> nullglob        off
> progcomp        on
> promptvars      on
> restricted_shell        off
> shift_verbose   off
> sourcepath      on
> xpg_echo        off
> 
> --
> http://tiny-tools.sourceforge.net/
> Swatch  @time http://www.ryanthiessen.com/swatch/resources.htm
> Convert @time http://www.mir.com.my/iTime/itime.htm
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/

-- 
Doug VanLeuven : 707-545-6945 (voice) 707-545-6945 (fax)
Programmer/Analyst, SCWA : doug AT scwa DOT ca DOT gov
Chief Engineer, USMM : roamdad AT attglobal DOT net

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019