Skip to content

Instantly share code, notes, and snippets.

Created June 1, 2016 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9e4cb4287c06f3bb6980dda73f86954e to your computer and use it in GitHub Desktop.
Save anonymous/9e4cb4287c06f3bb6980dda73f86954e to your computer and use it in GitHub Desktop.
$ find . -type f -exec echo {} +
./a/a/x ./a/b/c/x ./a/c/x
$ irb
irb(main):001:0> Dir.glob("*")
=> ["a"]
irb(main):002:0> Dir.glob("*/*")
=> ["a/a", "a/b", "a/c"]
irb(main):003:0> Dir.glob("**/*")
=> ["a", "a/a", "a/a/x", "a/b", "a/b/c", "a/b/c/x", "a/c", "a/c/x"]
irb(main):004:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment