#!/bin/bash # eqx-get-project-ssh-config # # Give a project name, generate an ~/.ssh/config snippet. EQXPROJECT="$1" if [[ $1 == "" ]] then \ echo -e "Need project name, such as:\n" eqx-get-project-names echo exit fi echo echo "# Add to ~/.clusterssh/clusters" echo -n "$EQXPROJECT " # For each Device, get hostname and IP for EQXDEVICEID in `eqx-get-project-devices-id "$EQXPROJECT"` do \ echo -n "`eqx-get-deviceid-hostname $EQXDEVICEID` " done echo