Say I have the following string in a bash script
"stuff qrg eqrhqe stuff wthwr /this/is/a/full/path/to/a/fils.txt sadf ergwqe"
How can I extract /this/is/a/full/path/to/a/fils.txt from this string in a bash script.
Knowing that:
- the extension of the file can change
- It might be a directory (so no
.ext) - the should be only one "path" in this string to look for
/withsedthentron ` ` but I look for something authoritative