Trying to find a list of files from a set variable. However the path needs to be specific.
filename=part-of-filename
Does not work:
find $HOME -regextype posix-extended -type f -regex "$filename-[[:digit:]]{4}-connect\.xml"
Also does not work:
find $HOME -regextype posix-extended -type f -regex "$filename-[[:digit:]]{4}-connect\.xml"
Works, but finds too much. Why is it forcing me to use '.*/'? $HOME is completely ignored here.
find $HOME -regextype posix-extended -type f -regex ".*/$filename-[[:digit:]]{4}-connect\.xml"