Simple network scanner: List all IP addresses responding to a ping

To list all IP addresses in a /24 network responding to a ping, you can use this command:

for ip in $(seq 1 254); do ping -c 1 -t 1 192.168.178.$ip; [ $? -eq 0 ] && echo "x.x.x.$ip UP" || : ; done | grep UP