piping a group of lines to a program



hi all,

i want to send a group of lines to a program in a script shell.

now i'm using:

echo "line 1" > $TMPFILE
echo "line 2" >> $TMPFILE
....
echo "line N" >> $TMPFILE

cat $TMPFILE | prog

rm -f $TMPFILE

it seems me very primitive, create / delete a temp file only to
"group" the lines for piping

is it any method to pipe these line directly without temp file?

tks in advance

.



Relevant Pages