bug-bash
[Top][All Lists]
Advanced

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

How to match pattern in bash?


From: Peng Yu
Subject: How to match pattern in bash?
Date: Tue, 22 Feb 2011 21:24:29 -0600

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.)

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



reply via email to

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