Created
April 19, 2011 22:00
-
-
Save noahcampbell/929828 to your computer and use it in GitHub Desktop.
Select nodes from a resources.xml file used by RunDeck
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 | |
# Expect stdin to be a pipe from a resources.xml file. | |
xmlstarlet sel -t -m //node -v @hostname -o , -v @tags -n | grep --color -E "${1:-.*}" | cut -d , -f 1 | sed "/^$/d" | sort | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment