Closed Ahmed-Nagdy closed 4 years ago
It's not a python code it's just bash. And, the problem you have it's this : for ip in / here is the problem / ' seq, bla bla bla '. You must use ( `` ) these to solve it.
Typo in your script. Closing as resolved.
!/bin/bash
for ip in ‘seq 2 254’; do ping -c 1 $1.$ip | grep “64 Bytes” | cut -d " " -f 4 | tr -d “:” & done
The result for that code as you know it should be shown all IPs for up running machines.
But the current situation show to me this error message: ping: 192.168.1.seq: Name or service not known