I want to write a Bourne shell script that takes a machine name as an argument and displays a message informing you whether the host is on the local network
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
migrated from stackoverflow.com Nov 27 '12 at 9:25
|
ping -c 1 -t 5 a_machine_name >> /dev/null && echo "The machine is on LAN" || echo "The machine is not conencted to LAN" |
|||
|
|
|
|||||||||
|