| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function cli_getFilesList { |
| |
| local LOCATION='' |
| local FILTER='' |
| local FILES='' |
| |
| |
| |
| |
| if [[ "$1" != '' ]];then |
| LOCATION="$1" |
| else |
| LOCATION="$ACTIONVAL" |
| fi |
| |
| |
| |
| |
| if [[ "$2" != '' ]];then |
| FILTER="$2" |
| else |
| FILTER="$FLAG_FILTER" |
| fi |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| FILTER="^.+/${FILTER}$" |
| |
| |
| |
| |
| |
| FILES=$(find ${LOCATION} -regextype posix-egrep -regex "${FILTER}" | sort | uniq) |
| |
| |
| if [[ $? -eq 0 ]];then |
| echo "$FILES" |
| fi |
| |
| } |