Friday, December 28, 2012

print files in directory



Running this script will give you the contents of a given directory (in linux)

#---
# Excerpted from "Everyday Scripting in Ruby"
# Visit http://www.pragmaticprogrammer.com/titles/bmsft for more book information.
#---

puts Dir.glob('**/*').each { | file | file.downcase }.sort

No comments:

Post a Comment