start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash | |
| # ssh-multi | |
| # D.Kovalov | |
| # Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
| # a script to ssh multiple servers over multiple tmux panes | |
| starttmux() { | |
| if [ -z "$HOSTS" ]; then |
| ssh() { | |
| if [ "$(ps -p $(ps -p $$ -o ppid=) -o comm=)" = "tmux" ]; then | |
| tmux rename-window "$(echo $*)" | |
| command ssh "$@" | |
| tmux set-window-option automatic-rename "on" 1>/dev/null | |
| else | |
| command ssh "$@" | |
| fi | |
| } |
| #Newbie programmer | |
| def factorial(x): | |
| if x == 0: | |
| return 1 | |
| else: | |
| return x * factorial(x - 1) | |
| print factorial(6) | |
| #First year programmer, studied Pascal |