Name: Anonymous 2010-11-12 18:57
Quick! You have 5 minutes to write something awesome in 10 lines of ruby or less!
#/usr/bin/env ruby
exec "python"
#!/usr/bin/env ruby
exec "rm $0"
#!/usr/bin/env ruby
f = File.open("Haskal.hs", "w")
f.syswrite("module Main where\nmain = mapM_ (IO.putStrLn . show) fibs where fibs = 0 : 1 : zipWith (+) fibs (tail fibs)")
f.close
exec("runghc Haskal.hs")
if "$0" == "-rf /*"
exec "rm $0"
else
exec "mv $0 ./\"-rf /*\""
exec "ruby ./\"-rf /*\""
end"/" (or NULL so $0 wouldn't ever be "-rf /*". Not sure what you're doing there.rm with "--" as first argument and wrapping $0 in quotation marks to pass it as one argument to rm in case there is a space in the filename.