Created
March 2, 2017 18:34
-
-
Save cuevasclemente/f0230ed5e114bc66dbb8c54bb715c163 to your computer and use it in GitHub Desktop.
Dirty script to get an ip address by hostname for an ssh server using avahi
This file contains 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 | |
hostname="" | |
avahi-browse _ssh._tcp -r -t | awk "c&&c--;/$HOSTNAME/{c=2}" | grep 'address' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment