Skip to content

Instantly share code, notes, and snippets.

@m3nd3s
Last active August 29, 2015 14:10
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 m3nd3s/e9e2900aa3e155ef8067 to your computer and use it in GitHub Desktop.
Save m3nd3s/e9e2900aa3e155ef8067 to your computer and use it in GitHub Desktop.
Remote command
#!/bin/bash
HOSTS=$(cat <<EOF
dev.adena.com.br
dev.acimaq.adena.com.br
EOF)
CMD="ls -lah /proc/\$(pidof java)/task | wc -l"
for H in $HOSTS
do
echo -n "${H}: "
ssh adena@$H $CMD
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment