help-bash
[Top][All Lists]
Advanced

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

Re: first arg of [[ always expand-safe ?


From: Greg Wooledge
Subject: Re: first arg of [[ always expand-safe ?
Date: Wed, 21 Aug 2024 19:51:59 -0400

On Thu, Aug 22, 2024 at 01:38:13 +0200, alex xmb sw ratchev wrote:
> [[ smth == "$var" ]]  <-- quotes required to not glob expand

Well, not "glob expand" but rather "glob pattern matching".

> [[ ! $var ]]  <-- do this need rather quotes .. ?

It does not need quotes, but you may use them if you prefer.

Remember, globs don't *expand* inside [[ commands.  They may be used as
pattern matching patterns.  Very different thing.



reply via email to

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