While 循环停止工作

While 循环停止工作
#!/usr/bin/ksh
# set the Internal Field Separator to a pipe symbol
IFS='|'

# file name
file=/backup/diskonly_backupfiles/EMPTORIS_ACE/LATEST/Batch1/contract.txt

# use while loop to read domain and ip 
while read contract dmsuuid
do
    print "$contract has contract $dmsuuid"
done <"$file"

以上是脚本,它没有显示任何内容

答案1

输入文件“contract.txt”是否可读?您可以使用“more”命令查看它:

$ more $file

相关内容