# Example from bottom of page62 # first create the file foobar cat > foobar <<\! This is the first line This line in file foobar contains morris This is the last line ! trap 'rm foobar' EXIT ed - foobar |& print -p /morris/ read -r -p line print -r -- "$line"