Using bash, how can one get the number of files in a folder, excluding directories from a shell script without the interpreter complaining?
With the help of a friend
ls -l | grep -v ^d | wc -l
One line.