|
Compare string to a pattern
I am new to unix and need to learn how to compare a variable $subject to a string pattern. If the variable has the word "Item" in it then it should be true. How do I do this? Currently I am using the Bourne shell but I can also use Korn or Bash.
I come from a Rexx background where strings are easy:
IF WORDPOS('Item', subject) > 0 THEN
SAY 'Found it'
END
|