#!/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 "lab10data" subdirectory of the directory where you have your "lab10a" executable. To run it do: # chmod 755 ./lab10data/tmux-lab10a.txt # ./lab10data/tmux-lab10a.txt # To switch to use a different pane, please type follwed the up/down/left/right key on your keyboard. # # lab10a topology: # +-------+ +-------+ # | 12000 +---+ 12002 | # +-------+ +-------+ set session_name="lab10a" 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 lab10data/*.log tmux new-session -d -s ${session_name} 'echo "(window1) "; \ script -c "lab10data/lab10a-12000.csh" lab10a-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 lab10data/lab10a-notes.txt; cat' # split the left pane vertically 50/50 tmux split-window -v -t 0 -p 50 'echo "(window2) "; \ script -c "lab10data/lab10a-12002.csh" lab10a-12002.script; \ echo "[ (1) type after server has quit to close this pane ]"; cat' tmux attach-session -d -t ${session_name} endif