In a follow-up question to a question asked yesterday:
I am running the below command in Datastage ETL tool, which executes the script in Linux.
I executed:
for file in /Path/filename_*; do [[ $(wc -l "$file" | cut -d' ' -f1) -eq 1 ]] && rm $file ; done
Reply=0
In this case I'm having empty files in the folder:
for file in /Path/filename_*; do [[ $(wc -l "$file" | cut -d' ' -f1) -eq 1 ]] && rm $file ; done
Reply=1
I don't have empty files in the folder.
Both are same commands with different reply, my job fails if i get reply code 1