[Top][All Lists]

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

Re: How to match pattern in bash?

From: Clark J. Wang
Subject: Re: How to match pattern in bash?
Date: Wed, 23 Feb 2011 11:51:20 +0800

On Wed, Feb 23, 2011 at 11:24 AM, Peng Yu <address@hidden> wrote:

> Suppose that I have a variable $x, I want to test if the content of $x
> match the pattern 'abc*'. If yes, then do something. (The operator ==
> doesn't match patterns, if I understand it correctly.)
Reread the bash manual about [[ == ]].

> Is there such a build-in feature in bash? Or I have to rely on some
> external program such as perl to test the pattern matching?
> --
> Regards,
> Peng

Clark J. Wang

reply via email to

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