Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 7
    But broken for files with spaces. Commented Feb 26, 2012 at 1:01
  • @jordanm use find . -printf "\"%p\"\n" Commented Feb 26, 2012 at 1:17
  • @ShipluMokaddim, that doesn't work. for x in $output with such a find command will cause a file named two words to be iterated over as one value "two and another value words". Commented Nov 16, 2020 at 14:07
  • 1
    @ShipluMokaddim, ...the same thing is true if you use ar=( $output ) with output assigned in that way, because parameter expansion and command substitution results don't go through the quote removal parsing phase. Commented Nov 16, 2020 at 14:08