I\'m learning bash scripting and have written a script to count the files and directories in the directory that is supplied as argument. I have it working one way which seem
... am wondering if there is a simpler way of doing it.
If you say so ;)
Alternatively, reduce your script to
find /path/to/directory | wc -l
For current directory, do:
find . | wc -l