Created
November 12, 2012 19:01
-
-
Save maxidr/4061187 to your computer and use it in GitHub Desktop.
ruby -x option
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
Dear Rubysts: | |
Did you know that Ruby can even read your emails? | |
#!/usr/bin/env ruby -w | |
puts "It's true." | |
__END__ | |
I told you it could |
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
# option -x: | |
# Tells Ruby that the script is embedded in a message. Leading garbage will be discarded until the first that starts | |
# with “#!” and contains the string, “ruby”. Any meaningful switches on that line will applied. The end of script | |
# must be specified with either EOF, ^D (control-D), ^Z (control-Z), or the reserved word __END__. If the directory | |
# name is specified, Ruby will switch to that directory before executing script. | |
ruby -x email.txt | |
# From: https://speakerdeck.com/jeg2/10-things-you-didnt-know-ruby-could-do |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More info: http://caiustheory.com/why-i-love-data