Hello Unix forum.
I'm encountering the following error "binary operator expected error" and I cannot seem to solve the issue.
I have the following source files to process:
CPA_LOOKUP_dat.lst
PROFILE_TXN_[0-9]_dat.lst
TRANSACTION_CODE_dat.lst
PROFILE_TXN_OUT_OF_BALANCE_dat.lst
and here's a sample of my code:
.....
if [ -e ${LST_SRC_DIR}/${source_filename}*${DATLST} ] &&
[ ${error_flag} == "FALSE" ]
then
archive_data_files
fi
.....
Where LST_SRC_DIR = /data
DATLST=_dat
All files are processed okay until the file PROFILE_TXN_[0-9]_dat.lst - then I get the following error:
line 418: [: /data/informatica/ming/SrcFiles/ACCTTXNLST/PROFILE_TXN_[0-9]_dat.lst: binary operator expected
Can someone help me out and improve my code to successfully process all of the files?
Thank you