Last active
August 29, 2015 14:02
-
-
Save bahelms/8cde38a65fbb23106a6d to your computer and use it in GitHub Desktop.
Print out file system text filtered thru a ruby regex at the command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You can use ls, echo, grep; whatever you are looking for. | |
# I wanted a list of just the rails migration filename timestamps, e.g. | |
$ ls rails_app/db/migrate/ | xargs -n1 | ruby -e "puts $<.read.scan(/\d*/)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment