For Loop

I am having a file Temp.txt with following record.

ACCT_ARR_SUMM_INTERFACE_HEW , ACCT_OPEN_DT || '}' || ARR_SRCE_KEY || '}' || SRCE_SYS_CDE , ACCT_OPEN_DT '}' ARR_SRCE_KEY '}' SRCE_SYS_CDE

i run simple following script having For loop.

for i in `cat Temp.txt`
do
echo $i
done

i am getting following output.

ACCT_ARR_SUMM_INTERFACE_HEW
,
ACCT_OPEN_DT
||
'}'
||
ARR_SRCE_KEY
||
'}'
||
SRCE_SYS_CDE
,
ACCT_OPEN_DT
'}'
ARR_SRCE_KEY
'}'
SRCE_SYS_CDE

In fact I am looking for the as the whole line itself, means.

ACCT_ARR_SUMM_INTERFACE_HEW , ACCT_OPEN_DT || '}' || ARR_SRCE_KEY || '}' || SRCE_SYS_CDE , ACCT_OPEN_DT '}' ARR_SRCE_KEY '}' SRCE_SYS_CDE

Please suggest.

Try something like:

while read i
do
  echo "$i"
done < Temp.txt

Regards

This is something I've encountered on some unix systems and not others. What's happening is that a space is being interpreted as not only a field separator, but a record separator. Yet it doesn't happen on all variants of unix. Is this something that might be set in an environment variable either in an individual account or system wide by default?

While loop with read command is working.

Thanks A lot Sir! :b: