#!/bin/bash outbound=/home/user/outbound/ putfile=DATA_FILE_PUT_*.CSV cd $outbound filecnt=0 for file in $putfile; do let filecnt=filecnt+1; done echo \"Filecount: \
Not sure why you need a piece of code here. Following one liner should do your job.
ls ${outbound}/${putfile} | wc -l
Or
find ${outbound} -maxdepth 1 -type f -name "${putfile}" | wc -l