How can I search get if to pinpoint 1 word in a line and have it do something for me?
example:
KEY1="<< Response ... Total of 2 >> Sun Jun 19 15:30:18 2011 Tx Power Level is 27.7 Bm ~ "
if [[ $KEY1 = "Tx" ]];
then command;
else error;
fi
Thats just a quick sample. I want my if statement to se the "Tx" in Key1 then issue the command but I can't seem to get it to search key1 just for Tx , I'm switching over to ksh since csh seems to be broken with if statements.
Getting a grep: illegal option -- q when I try to do use the ones with grep. Thanks for helping though I'm new and still learning. Still having trouble though, couldn't get any of the ones you recommended to work =/