swg 9d0e0162eb apply style guide
Applied [Google Shell Scripting Style Guide](https://google.github.io/styleguide/shellguide.html) to the check_folder snippet.
fixed naming bug of filesnpaths variable.
2023-11-21 08:18:31 +00:00
2023-11-21 06:51:16 +00:00

Collection of useful bash functions.

Every script file includes the function and a test to show how it's meant to be used and check that the function really works. Just executing the script runs that test.

Check folder for extension

Checks a given folder for certain file extensions recursively. All found files with the extension(s) are returned in a global array; New files are appended to the array.

The check_folder_for_extension test folder contains of 13 files, 12 of them images, which should be found by the test.

function call:

check_folder_for_extension ./cffe_test "*.jpg *.JPG"

For multiple extensions (or other parts of the file name to match) space separate the list, like shown above.

S
Description
Collection of useful bash functions.
Readme 1.5 MiB
Languages
Shell 100%