shell script problem.
Posted: Sat Mar 26, 2005 2:06 am
Hi all,
I am planned to delete a sequential file after run a job.But my shell script have problem.The problem is like this:
I pass the sequential file name as parameter to shell script. the shell script will read a text file which the text file name is the sequential file name and the other files' path which also will be deleted.
But the problem is : It will failed in case the text file only contain 1 line of input .It need 2nd line even it is blank. The script is write like this:
exec < $textfilename
while read LINE;
do
<capture the file name and path and delete the file>
done
Any ideas?how to set detect EOF? any web site recommend to me?I know here is forum for DataStage .But please help me on this. Thanks.
I am planned to delete a sequential file after run a job.But my shell script have problem.The problem is like this:
I pass the sequential file name as parameter to shell script. the shell script will read a text file which the text file name is the sequential file name and the other files' path which also will be deleted.
But the problem is : It will failed in case the text file only contain 1 line of input .It need 2nd line even it is blank. The script is write like this:
exec < $textfilename
while read LINE;
do
<capture the file name and path and delete the file>
done
Any ideas?how to set detect EOF? any web site recommend to me?I know here is forum for DataStage .But please help me on this. Thanks.