るりまサーチ

最速Rubyリファレンスマニュアル検索!
6件ヒット [1-6件を表示] (0.056秒)
トップページ > クエリ:|[x] > クエリ:-[x] > クエリ:*[x] > クエリ:alias_command[x]

別のキーワード

  1. _builtin *
  2. matrix *
  3. bigdecimal *
  4. array *
  5. vector *

ライブラリ

クラス

検索結果

Shell.alias_command(alias, command, *opts) {...} -> self (18338.0)

コマンドの別名(エイリアス)を作成します。 コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.

...を指定します.

使用例: ls -la | sort -k 5 のような例。

require 'shell'
Shell.def_system_command("ls")
Shell.alias_command("lsla", "ls", "-a", "-l")
Shell.def_system_command("sort")
sh = Shell.new
sh.transact {
(lsla | sort("-k 5")).each {|l|
puts l
}
}...