Re: basic pattern match Question..."newbie" doesn't understand (!...@#$@$)

2010-08-01 Thread Chris F.A. Johnson
On Sun, 1 Aug 2010, Linda Walsh wrote: 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.

basic pattern match Question..."newbie" doesn't understand (!...@#$@$)

2010-08-01 Thread Linda Walsh
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. Sorr