I have created a file with the name pingscript.sh
in Kali Linux included the below codes:
#!/bin/bash
if ["$1"==""]
then
echo "usage: ./pingscrpt.sh [Network]"
echo "usage: ./pingscrpt.sh 192.168.1"
else
for x in `seq 1 254`; do
ping -c 1 $1.$x | grep "64 bytes"
done
fi
but when running it with ./pingscript.sh
, I face the below error:
./pingscript.sh: line 3: [==]: command not found
What can be the problem?