So I'm writing a simple script and I cant seem to get it to work. It throws a error at the if statement.
#!/bin/bash
echo "Whats your name ?"
read NAME
if [$NAME == "SSJ" ]
then
echo "Welcome back SSJ"
fi
Do it like this:
#!/bin/bash
echo "Whats your name ?"
read name
if [ "$name" = "SSJ" ]
then
echo "Welcome back SSJ"
fi
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With