I'm having trouble writing a simple script that pings its current network. I want the output to look the same as a normal ping but I'm having trouble getting to that point
here's the original question from the assignment
-write a short script(using the ping command)to do a "ping" scan of your current network.
any help you can give is much appreciated
I originally tried printf
but I wasn't able to even get a decent output so I gave up and started using echo
This is what I have right now
#!/bin/bash
for ping in $(ping -c 4 -v 192.168.1.10)
do echo $ping
done
my teacher said that I would run into two problems with the simple ping script and that I could find the answer in the ping man pages. however I can't seem to find anything to help.
I basically want the script to run as if I just ran a normal ping command and have it display output in the same way.