[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: extglob pattern: @(/root) vs. @(root)
From: |
Clark J. Wang |
Subject: |
Re: extglob pattern: @(/root) vs. @(root) |
Date: |
Fri, 9 Dec 2011 16:21:56 +0800 |
On Fri, Dec 9, 2011 at 16:16, Clark J. Wang <address@hidden> wrote:
> See following:
>
> # shopt extglob
> extglob on
> # echo $BASH_VERSION
> 4.2.20(1)-release
> # ls -d /root
> /root
> # pwd
> /
> # echo @(root)
> root
> # echo @(/root)
> @(/root) <-- ???
> # echo @(/root*)
> @(/root*) <-- ???
>
But /@(root) and /@(root*) work:
# echo /@(root)
/root
# echo /@(root*)
/root
#
> #
>
> I'm confused why @(/root) and @(/root*) do not work here.
>
> --
> -Clark
>