#!/bin/bash echo -e "foo\nbar\nbaz" | exec ./test "${@}"