I have a file 'abc'like:
root#cat abc
no selected
root#
I need to compare the content of this test with the string 'no selected'. I do the following:
if [cat abc == "no selected"]; then
echo 1
else
echo 0
fi
but it doesn't work. How can I compare the file and that string?
Thank you very much!
root#cat abc
no selected
root#
I need to compare the content of this test with the string 'no selected'. I do the following:
if [cat abc == "no selected"]; then
echo 1
else
echo 0
fi
but it doesn't work. How can I compare the file and that string?
Thank you very much!