I am having problem writing the following script, this is more like a boolean case where i need to check for existance of a string in a file and if it exist i have to do certain things.
I dunno how I can ask this question. It seems like that I am not expressing my question correctly becuz i am not getting anything related to my question. I am not having problem with searching a string. I don't know how to use that output for if statement. lets say i do GREP STRING FILENAME this would give me either an output or nothing. I want to use this output as a condition to do my if statement but i dunno how to go about using this output. i mean what i have to use in order to get a condition out of this.
lets say we use
If ["$A" lt 0]; then .... but in my case i dunno what exactly i have to use for GREP SRTING FILENAME to see if this actually gives an output or it is NULL
I want something like If( GREP STRING FILENAME give me an output) do the following......