Created
March 31, 2015 12:18
-
-
Save danieltroger/d95913362cf1aa07a0a5 to your computer and use it in GitHub Desktop.
One-liner to get all active devices from thomsom router
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # The router localisation has to be swedish for this to work. You could surely even just replace "aktiv" with active but I ain't sure... | |
| curl -s "http://192.168.1.254/cgi/b/devs/ov/" | grep -i aktiv | grep -vi inaktiv | grep -v web | awk ' { print $13 } ' | cut -c 12- | sed 's/<.*//' | sort | tr '\n' ', ' | rev | cut -c 2- | rev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment