All Forums Marketing & CRM
rajesh4u4e 4 posts Joined 11/08
23 Nov 2008
how can we skip the multi load statement if the file is empty

Hi I am new to teradata. I am using Teradata on unix. I am facing some problem. can anyone help me please.this is the problem.how can we skip the multi load statement if the file is empty.grep 'test' file1> file2mload statement with file2 Thanks,Rajesh

idontknow 25 posts Joined 07/07
24 Nov 2008

grep 'test' file1> file2if [ `wc -l file2` -gt 0 ] ; then mload statement with file2fi;Basically this checks the file 'file2' has at least one row - you cold also use onee of the other wc options to check for characters if your file has a data row without any text.Check 'man wc' for all the options.

You must sign in to leave a comment.