Unanswered: how to find a file in a directory using shell script
I want to search for specific file pattern in a directory using the shell script .Written shell script but evey time I am getting file found even though the file pattern of type BI_999 is not found in current directory .
ls *BI_999.dat > ctrlfileslist.txt
if [ -z $ctrlfilename ]
echo " file not found "
echo " file found "