Could you please help me with an error I get when doing this exercise?
This is my code:
#!/bin/bash
first_greeting="Nice to meet you!"
later_greeting="How are you?"
greeting_occasion=0
if [ $greeting_occasion -lt 1 ]
then
echo $first_greeting
else
echo $later_greeting
fi
And this is the results in the terminal:
$./script.sh
$./script.sh: line 5: [1: command not found
How are you?
So despite the greeting occasion is zero the output is still the later greeting and I just can’t understand why.