Skip to content

Instantly share code, notes, and snippets.

@kingster
Created May 5, 2017 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kingster/8184ce525d78bf732809c9eeb47651d6 to your computer and use it in GitHub Desktop.
Save kingster/8184ce525d78bf732809c9eeb47651d6 to your computer and use it in GitHub Desktop.
#!/bin/bash
cluster="$1"
file=$(mktemp --tmpdir -t "$cluster.XXXXXXXXXXXX")
grep "$cluster" /etc/hosts| cut -d ' ' -f 1 > $file
pdsh -w "^$file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment