Salta al contenuto principale


Script to launch a few tmux tabs


Here's a script I just cooked to launch a few #tmux tabs (also as a GitHub Gist):
#!/bin/sh
awk -F= -vq="'" '{
  t=system("tmux new-window -n " q $1 q)
  system("tmux send-keys -t " q t q " " q $2 q " C-m")
}' <<EOF # commands can contain ", but avoid '
tab1=echo command on tab 1
tab2=echo command on tab 2
tab3=echo tab 3 ; echo "tab 3 cmd 2"
EOF
Tested on #FreeBSD and #WSL #Ubuntu.

distfp reshared this.