is there any way to grep 2 strings in ksh and only return true if both the string found?
we can use the egrep command if any of the string is found. but for matching all the string and return true only all the string present.
grep "string1" "sring2" file.txt is not working.
Kindly help. Thanks in advance.
Edit:
Please note that if grep is not used what other option we can use for this purpose. Also the first string is present in 1st line of the file and the string2 is present in some other line of the file.