#!/bin/sh # Ssh Branches for branch in $(git -C "$HOME/programs/config_local_arch" branch | awk '!/master/{print ($1=="*")?$2:$1}'); do echo "sshing to server $branch..." ssh -t "$branch" '. "$HOME/.profile";' "$@" done