Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > shellwordsライブラリ > Stringクラス > shellescape

instance method String#shellescape

shellescape -> String [added by shellwords]

文字列を Bourne シェルのコマンドライン中で安全に使えるようにエスケープします。

string.shellescape は、Shellwords.escape(string) と等価です。

[RETURN]
エスケープされた文字列を返します。

[SEE_ALSO] Shellwords.#shellescape

class String