Created
May 28, 2014 00:24
-
-
Save shinokada/e5c1ed3475920d585008 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/ruby | |
# http://zetcode.com/lang/rubytutorial/io/ | |
$stdout = File.open "output.log", "a" # redirect a standard output to a log file. | |
puts "Ruby" | |
puts "Java" | |
$stdout.close | |
$stdout = STDOUT # Use predefined standard constant STDOUT to recreate the normal standard output | |
puts "Python" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment