J
Jeff Mitchell
require "find"
Find.find("/usr/bin/") { |file| puts file }
[...]
/usr/bin//rmdir
/usr/bin//rm
/usr/bin//mv
/usr/bin//mknod
/usr/bin//mkfifo
/usr/bin//mkdir
/usr/bin//ls
/usr/bin//ln
/usr/bin//install
/usr/bin//du
/usr/bin//dircolors
/usr/bin//dir
/usr/bin//df
/usr/bin//dd
/usr/bin//cp
[...]
I ran into this while doing string compares between filenames obtained
from File.find and filenames obtained elsewhere. Needless to say they
didn't compare very well
FWIW, GNU's find, BSD's find, and perl's find all produce the same output
for "/usr/bin" and "/usr/bin/".
-Jeff
Find.find("/usr/bin/") { |file| puts file }
[...]
/usr/bin//rmdir
/usr/bin//rm
/usr/bin//mv
/usr/bin//mknod
/usr/bin//mkfifo
/usr/bin//mkdir
/usr/bin//ls
/usr/bin//ln
/usr/bin//install
/usr/bin//du
/usr/bin//dircolors
/usr/bin//dir
/usr/bin//df
/usr/bin//dd
/usr/bin//cp
[...]
I ran into this while doing string compares between filenames obtained
from File.find and filenames obtained elsewhere. Needless to say they
didn't compare very well
FWIW, GNU's find, BSD's find, and perl's find all produce the same output
for "/usr/bin" and "/usr/bin/".
-Jeff