[Top][All Lists]

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

Re: extglob problems in bash

From: Enrique Perez-Terron
Subject: Re: extglob problems in bash
Date: Sun, 16 Oct 2005 19:22:00 +0200
User-agent: Opera M2/8.50 (Linux, build 1358)

On Sun, 16 Oct 2005 17:10:48 +0200, <address@hidden>
posted on comp.unix.shell:

I have a problem that I'm trying to solve with the help of extended
globbing. It doesn't work, and so I've narrowed down the buggy bit to a
simple, illustrative example.

I need to match literal parentheses in a globbing pattern. Normally it
works OK:

$ touch foo\(
$ ls foo\(

But with extglob operators, I cannot match parentheses. Here is a very
simple example:

$ shopt -s extglob
$ ls @(foo\()
-bash: syntax error near unexpected token `('

I get a different result, but still not as I would expect:

   $ touch foo\(
   $ ls foo*
   $ shopt -s extglob
   $ ls @(foo\()
   ls: @(foo(): No such file or directory
   $ ls @(foo*)
   $ echo $BASH_VERSION


reply via email to

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