Searching for a specific string in an argumnet

I want to check the second argument for a specific string .

The code below is what I am trying, but I get:

UX:test (./test): ERROR: { if ($0 ~ /StringImLooking4/) {print $1} }: Unknown operator

I want to test if the second argument contains the string StringImLooking4

Unixware 7

code:

#!/bin/sh
echo $2 > /tmp/temp1
if [ /usr/bin/awk '{ if ($0 ~ /StringImLooking4/) {print $1} }' /tmp/temp1 ]; then

cp -p *.log \SAVE
rm /tmp/temp1
fi

If expr finds the desired string, it will test true:

if expr "$2" : ".*StringImLooking4" > /dev/null ; then
   echo 'its there'
fi

Or you could test the output of expr, which will be length of the located string. Note that I have to enclose this nested command within back-quotes:

if [ `expr "$2" : ".*StringImLookingFor"` -gt 0 ] ; then
   echo 'its there'
fi