Advertisement
Guest User

Untitled

a guest
Jan 12th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.26 KB | None | 0 0
  1. require 'pry'
  2. puts "Please type in unquoted shell command"
  3. command = gets.chomp
  4. #map = {'\'' => "\'", '"'=> '\"' }
  5. #map.each {|k,v| command.sub!(k,v)}
  6. puts command.shellescape
  7. #binding.pry
  8. #puts escaped
  9. #Please type in unquoted shell command
  10. #test '
  11. #test\ \'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement