To test if I understand the grep command correctly I used this little script:
$items="no way test";
if (grep /$items/,"test"){print "ok";}
These lines should print "ok" sice test appears in $items.
Though "ok" isn't printed. What am I doing wrong here ?
I've tried it the other way around:
if (grep /"test"/,$items){print "ok";}
but that didn't work either
$items="no way test";
if (grep /$items/,"test"){print "ok";}
These lines should print "ok" sice test appears in $items.
Though "ok" isn't printed. What am I doing wrong here ?
I've tried it the other way around:
if (grep /"test"/,$items){print "ok";}
but that didn't work either