Last active
August 29, 2015 14:09
-
-
Save oldergod/0b68eec9bee4c68e35f3 to your computer and use it in GitHub Desktop.
Ruby inline with before and after blocks
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
ls | ruby -ne 'BEGIN{puts("lets go");$array = []};$array << $_.chomp;END{puts $array.inspect;puts "finished"}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment