[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] The best way to trim trailing .tiff or .tif?
From: |
Greg Wooledge |
Subject: |
Re: [Help-bash] The best way to trim trailing .tiff or .tif? |
Date: |
Mon, 22 Oct 2012 08:09:59 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Sun, Oct 21, 2012 at 11:42:20AM -0500, Peng Yu wrote:
> > if [[ $f = *.tiff ]]
>
> Where is the above usage documented? I found the following for the man
> page, but I'm not sure which one documents it.
> [[ expression ]]
> Return a status of 0 or 1 depending on the evaluation of the
> conditional expression expression. Expressions are composed of
> the primaries described below under CONDITIONAL EXPRESSIONS.
> Word splitting and pathname expansion are not performed on the
> words between the [[ and ]]; tilde expansion, parameter and
> variable expansion, arithmetic expansion, command substitution,
> process substitution, and quote removal are performed. Condi-
> tional operators such as -f must be unquoted to be recognized as
> primaries.
Keep reading a bit farther:
When the == and != operators are used, the string to the right of
the operator is considered a pattern and matched according to the
rules described below under Pattern Matching.
The fact that = and == are equivalent in this context may not be
explicitly documented.