Ok I need help figuring out why this code doesn't work, I've listed my problem below the code.
#!/bin/bash
if [ "$1" == "" ]
then
echo "You forgot an IP adress!"
echo "Syntax: ./ipsweep.sh xxx.xxx.x"
else
for ip in `seq 1 254`; do
ping -c 1 $1.$ip | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" &
done
fi
now when I run the command ./ipsweeper.sh
the program still runs even though the input is nothing. Please help can't see where it fails.