#!/bin/bash printf "foo\nbar\nbaz" | exec $(dirname $0)/test "$@"