Hi
How I can search for a string/pattern from a text file from mib2c.scalar.conf file. I need to search for a string, if the string is present in the file I have to call function1() else function2().
I had tried following ways, but none of them are working J
[EMAIL PROTECTED] $(grep "$i.parent" tst.txt) != 0@
Working……
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
#if [[ $(grep -c "$i.parent" tst.txt) != 0 ]];then echo "working 123";fi
[EMAIL PROTECTED]@
[EMAIL PROTECTED] cc=`grep "$i.parent" tst.txt`@
printing....
#cc
#$cc
How I can give grep command from mib2c and get the result (pattern is found or not)?
Is there other way to search for a string/pattern in text file?
Kanda
