请问关于shell: while read line里的line 是从哪里来的
while read line
do
# skip blank lines
if [ "${line}" = "" ]; then
continue
fi
# get action - 1st word in command
action=`echo "${line}" | cut -d" " -f1`
# Execute the command
db2 -tv "${line}"
rc=$?
if [ ${rc} -eq 0 ]; then
if [ "${action}" = "import" ]; then
if [ "${flg_del_ixf_on_import_success}" = "Y" ]; then
# get ixf filename - 3rd word in command
ixf_file=`echo "${line}" | cut -d" " -f3`
echo "rm ${ixf_file}"
rm ${ixf_file}
fi
fi
continue
fi
#=======================================
# if we get here, had non-zero ret code
#=======================================
# if command is "drop xxx", probably being done to prepare for
# a later "create xxx" command, so we'll ignore error.
if [ "${action}" = "drop" ]; then
word2=`echo "${line}" | cut -d" " -f2`
echo "Ignoring drop ${word2} error"
continue
fi
# Return immediately if rc is higher than allowed.
# Otherwise, ensure retVal is highest rc seen so far,
# so we can return highest return code when done.
if [ ${rc} -gt ${rc_max_continue} ]; then
return ${rc}
else
if [ ${rc} -gt ${retVal} ]; then
retVal=${rc}
fi
fi
done < ${filename}
程序很长,不过问题在第1行
请问第1行while语句的line 是从哪里来的呢?
整个函数都没有对Line的描述或者定义。
麻烦高手帮忙。