#!/bin/tcsh -f # # This script is for your convenience. It's NOT EXACTLY THE SAME as going throught the steps in the grading guidelines. # It's best that you run through section (A) of the grading guidelines manually so you won't get any grading surprises! # # This file should be in the "lab11data" subdirectory of the directory where you have your "lab11a" executable. To run it do: # chmod 755 ./lab11data/tmux-lab11a.txt # ./lab11data/tmux-lab11a.txt # To switch to use a different pane, please type follwed the up/down/left/right key on your keyboard. # # lab11a topology: # +-------+ +-------+ +-------+ # | 12000 +---+ 12002 +-----+ 12004 | # +-------+ +-------+ +-------+ set session_name="lab11a" set running=`tmux list-sessions | grep "${session_name}:"` if ("x$running" != "x") then # it's running echo "Session '${session_name}' already exists" else # create 4 panes, one at the bottom, two on the left, and one on the right # create a tmux session /bin/rm -f lab11data/*.log tmux new-session -d -s ${session_name} 'echo "(window1) "; \ script -c "lab11data/lab11a-12000.csh" lab11a-12000.script; \ echo "[ (1) type after server has quit to close this pane ]"; cat' # split the current pane vertically 95/5 tmux split-window -v -p 5 # split the top pane horizontally 60/40 tmux split-window -h -t top -p 40 'more lab11data/lab11a-notes.txt; cat' # split the left pane vertically 33/67 tmux split-window -v -t 0 -p 33 'echo "(window3) "; \ script -c "lab11data/lab11a-12004.csh" lab11a-12004.script; \ echo "[ (3) type after server has quit to close this pane ]"; cat' tmux split-window -v -t 0 -p 50 'echo "(window2) "; \ script -c "lab11data/lab11a-12002.csh" lab11a-12002.script; \ echo "[ (2) type after server has quit to close this pane ]"; cat' tmux attach-session -d -t ${session_name} endif