From: Herbert on
Hello,

In a ksh script, I used the followings:

INPUT_FILE="aa. \
bb. \
cc. \
dd. \
ee. \
ff. \
gg"

To get the record,

for j in $INPUT_FILE

But there are many records in INPUT_FILE and I'd like to make it a
seperate file and read it in the script. Can anyone tell me how to do
it please?

I was told to use somthing like this, "while read /user/INPUT_FILE
IN_FILE".

Thanks

From: Ed Morton on
Herbert wrote:
> Hello,
>
> In a ksh script, I used the followings:
>
> INPUT_FILE="aa. \
> bb. \
> cc. \
> dd. \
> ee. \
> ff. \
> gg"
>
> To get the record,
>
> for j in $INPUT_FILE
>
> But there are many records in INPUT_FILE and I'd like to make it a
> seperate file and read it in the script. Can anyone tell me how to do
> it please?
>
> I was told to use somthing like this, "while read /user/INPUT_FILE
> IN_FILE".
>
> Thanks
>

Is this what you're looking for:

while read var
do
echo "$var"
done < file

Regards,

Ed.