[geeks] bash string matching

Shannon Hendrix shannon at widomaker.com
Fri Jun 6 10:27:22 CDT 2008


On Jun 4, 2008, at 22:01 , der Mouse wrote:

> Try [[ "$STRING" =~ *"is a geek"* ]] instead.

Yeah, that works, as does this:

	[[ "$STRING" == *"one string"*"two string"* ]]

I love having a "language" with context dependent string handling... :)

This is cleaner than the meta patterns anyway, thanks.

-- 
Shannon Hendrix
shannon at widomaker.com



More information about the geeks mailing list