Last active
August 12, 2019 15:40
-
-
Save vytautaskubilius/a3b49f17c42ee662d8d281cfd652b2af to your computer and use it in GitHub Desktop.
Bash function to search ScaleFT for a hostname
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
function sftsearch { | |
sft list-servers -o json | jq -r '.[]|select(.hostname | match(".*'$1'.*";"i"))|({"---- ":"----"},{id},{hostname},{access_address},{last_seen},{state},{"---- ":"----"})|to_entries[]|"\(.key): \(.value)"' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment