るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.137秒)
トップページ > クエリ:i[x] > クエリ:-[x] > バージョン:2.4.0[x] > クエリ:shellescape[x] > クエリ:escape[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. irb/input-method encoding

ライブラリ

クラス

モジュール

検索結果

String#shellescape -> String (82258.0)

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

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

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

@return エスケープされた文字列を返します。
@see Shellwords.#shellescape

Shellwords.#shellescape(str) -> String (73222.0)

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

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

@param str エスケープの対象となる文字列を指定します。
@return エスケープされた文字列を返します。

例:
require 'shellwords'

pattern = 'Jan 15'
puts "grep #{Shellwords.shellescape(pattern)} file"
# => grep Jan\ 15 file

Shellwords.escape(str) -> String (54922.0)

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

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

このメソッドは、Shellwords.#shellescape の別名です。

@param str エスケープの対象となる文字列を指定します。
@return エスケープされた文字列を返します。