I was wondering if anyone could help me with this problem:
Write a script called countFiles that takes two arguments, the initial directory and the number of levels and returns the count of all files (including directories) in the directories and subdirectories up to the number of levels.
*** This script must use loop(s), traverse directories, count files in a single directory, have an error detection, and determine that a file is a directory. (Use find if you would like)