+ # Desc: Lists working directory file basenames
+ # Usage: list_files
+ # Input: fext var file extension
+ # Output: stdout a line-delimited list of file names
+ if [[ -z "$fext" ]]; then
+ find . -mindepth 1 -maxdepth 1 -type f -exec basename '{}' \; ;
+ else
+ find . -mindepth 1 -maxdepth 1 -type f -exec basename '{}' \; \
+ | grep -E -- "${fext}$" ;
+ fi;
+}; # list pwd file basenames