Skip to content

Instantly share code, notes, and snippets.

@maeharin
Last active December 10, 2015 04:08
Show Gist options
  • Save maeharin/4378658 to your computer and use it in GitHub Desktop.
Save maeharin/4378658 to your computer and use it in GitHub Desktop.
ruby one liner
# directory name
ls -laF | ruby -e '$stdin.read.scan(%r![\S]+/!) {|m| puts m}'
# or
ls -laF | ruby -ne 'puts $_.split("\s")[8]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment