Skip to content

Instantly share code, notes, and snippets.

@baroquebobcat
Created September 30, 2009 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baroquebobcat/198514 to your computer and use it in GitHub Desktop.
Save baroquebobcat/198514 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
args = ARGV.dup
snark_for_options = {
'-l' => "You can't do anything, you can't even spell sudo",
'-s' => "Don't even think of running as the uper suser.",
'-b' => "Run it in the background? Hah, fat chance.",
'-e' => "Edit which file? Oh wait, you can't"
}
indent = " "*4
additional_snark = args.map{|arg| indent + snark_for_options[arg].to_s if snark_for_options[arg]}.join "\n"
puts "----USDO----"
puts indent + "You mispelled sudo"
puts additional_snark unless additional_snark.empty?
puts indent + "are you really sure you want to try running",indent+"'sudo #{args.join(' ')}'????"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment