2
I’ve been trying to make a code to automate the steamcmd but always gave me this mistake syntax error near Unexpected token `fi', someone could help me?
Code:
STEAMCMDDOWN="https://steamcdn-a.akamihd.net/client/installer/steamcmd_linux.tar.gz"
STEAMDIR="~/steamcmd"
if [! -d "$STEAMDIR" ]; then
mkdir "~/steamcmd"
cd "~/steamcmd"
else
if [! -f "steamcmd.sh" ]; then
wget "$STEAMCMDDOWN"
tar +xf "steamcmd_linux.tar.gz"
else
echo "steamcmd installed"
fi
exit
fi
I managed to make the above code run without errors by removing the
!
from within theif
statements.– Vinicius Placco