Simple shell script is driving me crazy
I am trying to write a shell script using if .. then.. else.. should be fairly easy, but my script always outputs else function. For example the script bellow always outputs "Shame on you!!" even when the ANSWER is yes:
echo "Are you a good person?"
if [$ANSWER="yes"]; then
echo "Good for you!!"
else echo "Shame on you!"
And I already tried writing "if" statement different ways, but outcome is always the same... I am obviously missing a point here, and I tried looking up simmilar simple problems on internet, and the ones I found work fine.. Don't see what mine is missing though..