Module Shellwords
In: lib/lore/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/lore/facets/shellwords.rb, line 31
  def escape(cmdline)
    cmdline.gsub(/([\\\t\| &`<>)('"])/) { |s| '\\' << s }
  end

[Validate]