Module Shellwords
In: lib/more/facets/shellwords.rb

Methods

escape  

Public Instance methods

Escape special characters used in most unix shells to use it, eg. with system().

[Source]

    # File lib/more/facets/shellwords.rb, line 31
31:   def escape(cmdline)
32:     cmdline.gsub(/([\\\t\| &`<>)('"])/) { |s| '\\' << s }
33:   end

[Validate]