[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
> NO_OF_FILES=`ls ${DIRECTORY}/*.eps|wc -l`
Uses two child processes, more efficient to save the list of files into an array, then look at the length of the array:
files=($directory/*.eps)
no_of_files=${#files[*]}
You CAN use test if you want Bourne shell syntax, or you can:
if (( $no_of_files > 0 ))
then
# do stuff
fi
Clive