Skip to content

Instantly share code, notes, and snippets.

Last active February 18, 2023 17:43
What would you like to do?
Open a few `tmux` tabs with specific name and commands
awk -F"\t" -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 ' and tabs
tab1 echo command on tab 1
tab2 echo command on tab 2
tab3 echo tab 3 ; echo "tab 3 cmd 2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment