Quote:
Originally Posted by
petel1
i have a question, what does the: -c2 switch do
...
the 2 means two packets transmitted right, what if i type 3 ?
-c count
Stop after sending (and receiving) count ECHO_RESPONSE packets.
If this option is not specified, ping will operate until inter-
rupted. If this option is specified in conjunction with ping
sweeps, each sweep will consist of count packets.
If you type 3, then ping will obviously send 3 echo_response packets.
Simply try to manually run this command and you will immediately know what it does.
Quote:
Originally Posted by
petel1
and: >/dev/null ?
It simply prevents all that ping output to be shown on the terminal.
Try to remove it, and you will see the difference.
Quote:
Originally Posted by
petel1
how does this: done < "$1" work?
Thats the argument you submit with this script, namely the file with computer names/ip's.
When you run this script like
./script computerlist.txt the
$1 will become
computerlist.txt