Test operator

view story

http://www.unix.com – In my script (currently running on Solaris ) I'm testing for zero size with wild character. There are mutilple files exist in the directory. if [ -s ${fileformat}.${date}.? ] then filename=`ls -1tr ${fileformat}.${date}.? | tail -1` else ${BATCH_FATAL:-echo} "$0:ERROR:No file found ${source}/${fileformat}.${date}.?" exit 1 fi however when this on Linux it throws an error Found kernel 2.6 ./extract_opt_price.sh: line 57: [: too many arguments (HowTos)