if condition in sending mail

view full story

http://www.unix.com – hello Gurus i have tp tackle a condition like below I have two files to check for any data in it apart from header if one of the file has data I have to send mail given the file name So far my code is Code: if [ $count_file1 != 1 ]|| [ $count_file2 != 1 ] ; then (printf "%s\n%s\n" "Please check the below bad files: " $Bad_files/$file_name1 $Bad_files/$file_name2 ) |mailx -s "Bad Data for DVCN" Mailid fi But the issue is even one file has no data the file name also going in the mail So kindly let me know how to modify the printf condition so it (HowTos)