#!/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}:consumer.0 'cat > /tmp/wait'
sleep 1
tmux send-keys -t ${session}:consumer "echo build" C-m
sleep 5
tmux pipe-pane -o -t ${session}:consumer.0

cat /tmp/wait
