#!/bin/bash
session="scenario1"

rm /tmp/wait

tmux new-session -d -s $session

tmux new-window -t ${session}:1 -n 'consumer'
tmux pipe-pane -t ${session}:1.0 'cat > /tmp/wait'
sleep 1
tmux send-keys -t ${session}:1.0 "echo build" C-m
sleep 2
tmux pipe-pane -o -t ${session}:1.0

cat /tmp/wait
