I need to create one very simple shell script that checks if the first character of the file ./pump.txt is 0 and in that case gives a message.
If the first character is instead 1, it does give a different message.
I have written:
irr= head -c 1 ./pump.txt
if [[ "$irr" == "0" ]]; then
echo "!!!!!!!!!! Disabled"
else
echo "Enabled"
fi
It does not work.
Ps, the file ./pump.txt is generated by the following commands: