# cat test01
#!/bin/sh
FILE="tmp"
echo "Input"
read -d ' ' LIST
for i in $( echo $LIST)
do
echo $i
done > $FILE
# ./test01
Input
1
2
3
4
5
6
7
8
9
# cat tmp
1
2
3
4
5
6
7
8
9
「 」(半角スペース)入力までを読み込む。(read のデフォルトは1行読み込み。-d で変更している)
./tmp ファイルへ書き込み。