···11#!/bin/sh
22+#
23# input: us-east-1a 172.29.71.236 i-0a7eb3896d61b4d22 Krakencld-app-ASG-A running m5.large None browse_test
33-# ssh's to hosts listed from jws-grep output
4455+# if > 1 argument: run the given command on each remote system and stream the output
56if ! [ -z "$1" ]; then
66- echo "This script cannot be used interactively"
77- exit 1
77+ echo "establishing connections..."
88+ while IFS='$\n' read -r i; do
99+ echo $i
1010+ ip=$(echo "$i" | awk '{print $2}')
1111+ ssh "$ip" "$1"
1212+ done
1313+ exit 0
814fi
9151010-1616+# if no arguments: opens tmux panes to every remote host in list via ssh, sync panes
1117tmux set default-shell "/bin/sh"
1212-# tmux new-window 'sleep 0.1'
1818+tmux new-window 'sleep 0.1'
1319while IFS='$\n' read -r i; do
1420 ip=$(echo "$i" | awk '{print $2}')
1521 tmux split-window "ssh $ip"
1622 tmux select-layout tiled
1723done
1824tmux set -u default-shell
1919-# tmux select-layout tiled
2020-# tmux setw synchronize-panes on
2121-2222-# todo?
2323-# if one result, directly ssh
2424-# if more than one result, do new window tmux madness
2525-2525+tmux select-layout tiled
2626+tmux setw synchronize-panes on
···11-#!/bin/bash
22-33-for fgbg in $(seq 38 48) ; do # Foreground / Background
44- for color in $(seq 238 255) ; do # Colors
55- # Display the color
66- printf "\e[${fgbg};5;%sm %3s \e[0m" $color $color
77- # Display 6 colors per lines
88- if [ $((($color + 1) % 6)) == 4 ] ; then
99- echo # New line
1010- fi
1111- done
1212- echo # New line
1313-done
1414-1515-exit 0