Skip to content

Instantly share code, notes, and snippets.

@jessereynolds
Created November 28, 2013 00:46
Show Gist options
  • Save jessereynolds/7685633 to your computer and use it in GitHub Desktop.
Save jessereynolds/7685633 to your computer and use it in GitHub Desktop.
getting a handle on directories with control characters in them using ruby's irb shell
irb(main):007:0> Dir.foreach('.') {|i| puts i.inspect if i.match(/[[:cntrl:]]/)}
"\026l}"
"@\021\273@f\364"
"\241\022"
"@\002"
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment