I want to get the hostname and user info who is currently loggedin on the network.
It can be a shell script or a command.
I have tried the following, but it only states the connected ipaddress.
for ip in $(perl -e '$,="\n"; print 1 .. 254;') ; do ping -t 1 -c 1 192.168.0.$ip>/dev/null; [ $? -eq 0 ] && echo "192.168.0.$ip UP" || : ; done