When I run this command, it also prints the actual $item
in the file when the grep is successful. I do not want to print the content/$item
. I just want to show my echo.
How can I do that?
if grep $item filename; then
echo it exist
else
echo does not exist
fi
See Question&Answers more detail:os