[Top][All Lists]

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

Re: getting FNM_PATHNAME behaviour from pattern matching

From: Chet Ramey
Subject: Re: getting FNM_PATHNAME behaviour from pattern matching
Date: Mon, 09 Feb 2009 11:38:54 -0500
User-agent: Thunderbird (Macintosh/20081209)

Sitaram Chamarty wrote:
> Hello,
> I'm trying to match a patterm that requires the behaviour of
> FNM_PATHNAME (from fnmatch(3)).  Unlike, say, FNM_PERIOD,
> which is emulated by unsetting 'dotglob', there does not
> seem to be an equivalent to emulate FNM_PATHNAME.
> I'd like
>     [[ abc/dd/def.html == abc/*.html ]]; echo $?
> to return 1, not 0.
> What am I missing/doing wrong?

You're not doing anything wrong.  There's no mechanism to force
FNM_PATHNAME-style matching using the [[ command.


``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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