I'm trying to use regex inside a file operator to seek for a file where one subdirectory is specified with a regex, but I wonder if it's even possible. I think I tried all the quote and bracket combinations possible. Either I'm missing something here, or a file operator requires a specific path?
I'm not entirely sure. Could somebody please clarify?
What I want to achieve is something like this (this obviously doesn't work because it takes the regex part as name of the subdirectory)
if [[ -r '/agent/[0-9 .]*/bin/run.sh' ]]