#!/bin/bash
echo "Whats your name ?"
read NAME
if [$NAME == "SSJ" ]
then
echo "Welcome back SSJ"
fi
答案 0 :(得分:2)
这样做:
#!/bin/bash
echo "Whats your name ?"
read name
if [ "$name" = "SSJ" ]
then
echo "Welcome back SSJ"
fi
答案 1 :(得分:0)
试试这个:
#!/bin/bash
echo "Whats your name ?"
read NAME
if [ "$NAME" == "SSJ" ]; then
echo "Welcome back SSJ"
fi