Skip to main content
added 1 character in body
Source Link
Kusalananda
  • 355.8k
  • 42
  • 735
  • 1.1k

@muru 's answercomment was correct, except I forgot to add an additional detail to my question, which was that I want an empty list if no files match (so that I can fail the script).

With this additional context the way I achieved this was

shopt -s globstar nullglob; printf %s\\n dir/subdir/**/*.ext

Thanks to this answer for additional nullglob.

@muru 's answer was correct, except I forgot to add an additional detail to my question, which was that I want an empty list if no files match (so that I can fail the script).

With this additional context the way I achieved this was

shopt -s globstar nullglob; printf %s\\n dir/subdir/**/*.ext

Thanks to this answer for additional nullglob.

@muru 's comment was correct, except I forgot to add an additional detail to my question, which was that I want an empty list if no files match (so that I can fail the script).

With this additional context the way I achieved this was

shopt -s globstar nullglob; printf %s\\n dir/subdir/**/*.ext

Thanks to this answer for additional nullglob.

Source Link
Kepboy
  • 121
  • 3

@muru 's answer was correct, except I forgot to add an additional detail to my question, which was that I want an empty list if no files match (so that I can fail the script).

With this additional context the way I achieved this was

shopt -s globstar nullglob; printf %s\\n dir/subdir/**/*.ext

Thanks to this answer for additional nullglob.