Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'pry'
- puts "Please type in unquoted shell command"
- command = gets.chomp
- #map = {'\'' => "\'", '"'=> '\"' }
- #map.each {|k,v| command.sub!(k,v)}
- puts command.shellescape
- #binding.pry
- #puts escaped
- #Please type in unquoted shell command
- #test '
- #test\ \'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement