Created
January 27, 2011 01:30
-
-
Save qingfeng/797895 to your computer and use it in GitHub Desktop.
Production is Red
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export R=$1 | |
export G=$2 | |
export B=$3 | |
/usr/bin/osascript <<EOF | |
tell application "Terminal" | |
tell window 0 | |
set the background color to {$(($R*65535/255)), $(($G*65535/255)), $(($B*65535/255))} | |
end tell | |
end tell | |
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for s in server1 server2 server3 | |
do | |
if [[ "$@" = "$s" ]]; then | |
~/tools/bg_color.sh 20 0 0 | |
fi | |
done | |
ssh $@ | |
~/tools/bg_color.sh 0 0 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment