i have a scenario where i have three words in a file called demo.txt
My three words are : apple , mango , grapes
i want to write a one linear command to check if all three word exist in a file then display match found successfully or otherwise display match not found
how to do with awk command in one linear way
below is my code not working
awk '{print (/apple/|/mango/|/grapes/ ? "true : match found " : "false : not found ")}' /D/demo.txt
sample file : demo.txt
abc:apple
b:mango
fgg:grapes
ball , candle
vik,mani
raj,vilas
apart from first file **i have second file which contain below text
Azr
hjkds
$$ABC=%wkde**mo
$Bilas=%ram
xyz
vxbnx
ram
I want to check whether the exact keyword present or not $$ABC=%wkde**mo $Bilas=%ram
if match found display message keyword found or otherwise display keyword not found