|
From: | Linda Walsh |
Subject: | basic pattern match Question..."newbie" doesn't understand (!@#$@$) |
Date: | Sun, 01 Aug 2010 18:00:46 -0700 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 |
I have: w="/home/law/bin/package: line 5: type: xx: not found" The =~ operator is suppose to use the RH Expr as a ext.-regex. So why doesn't this match and print "not found"? if [[ $w =~ ".*not found.*" ]]; then echo "not found"; fi It prints nothing. Seems like such a basic concept. Sorry, this newbie needs help on such trivial matters. :-( > echo $BASH_VERSION 4.0.35(1)-release
[Prev in Thread] | Current Thread | [Next in Thread] |