#!/bin/bash echo -e "foo\nbar\nbaz\njohn\nsally\nharry\n" > /tmp/test for crap in $(cat /tmp/test) do echo $crap done