As my journey through Bash goes on, I'm still stuck on ridiculous stuff such as this script I just can't wrap my head around on:
#!/bin/bash
if [ $1 -gt 100 ]
then
echo "You typed a larger number"
if (( $1 % 2 == 0 ))
then
echo "And it's even an even number"
fi
Recently I was recommended to keep ShellCheck at hand's reach, and so I did, but it seems like its suggestions on how to improve this script doesn't work out either. Basically when I try to run it, I always get errors like "[: !=: unary operator expected" even when I try to quote $1 into "$1", which is also recommended by ShellCheck. Could anyone help me down? Thanks a lot in advance!