Created
March 3, 2011 19:57
-
-
Save judofyr/853394 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
=begin 2>/dev/null | |
exec ${RUBY_BIN:-ruby} -e"\$0='$0'; load '$0'" -- $@ | |
=end | |
#!/usr/bin/env ruby | |
puts 123 | |
# Examples: | |
# | |
# Just run the script: | |
# $ ./script | |
# $ sh script | |
# | |
# Run the script with a specific interpreter: | |
# $ ruby script | |
# $ jruby script | |
# | |
# Always run the script with a specific interpreter (set this in your .bashrc): | |
# $ export RUBY_BIN=/usr/bin/ruby | |
# $ ./script | |
# $ ./script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment