別のキーワード
種類
- インスタンスメソッド (174)
- 特異メソッド (30)
- ライブラリ (6)
ライブラリ
- pstore (24)
- shell (78)
-
shell
/ command-processor (36) -
shell
/ filter (66)
クラス
- PStore (24)
- Shell (78)
-
Shell
:: CommandProcessor (36) -
Shell
:: Filter (66)
キーワード
- < (6)
- > (6)
- >> (6)
-
alias
_ command (6) - cat (18)
- cd (6)
- chdir (6)
-
def
_ system _ command (6) - echo (18)
- glob (18)
-
in
_ transaction (12) -
install
_ system _ commands (6) - out (18)
- shell (6)
- tee (18)
-
to
_ s (6) - transaction (12)
-
unalias
_ command (6) -
undef
_ system _ command (6) - | (6)
検索結果
-
Shell
:: Filter # |(filter) -> object (6.0) -
パイプ結合を filter に対して行います。
...require 'shell'
Shell.def_system_command("tail")
Shell.def_system_command("head")
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
i = 1
while i <= (cat("/etc/passwd") | wc("-l")).to_s.chomp.to_i
puts (cat("/etc/passwd") | head("-n #{i}") | tail("-n 1")).to_s... -
shell (6.0)
-
Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。
...f.puts "TEST"
f.close
end
print sh.pwd
end
end
==== Example 2:
require 'shell'
sh = Shell.cd("/tmp")
sh.transact do
mkdir "shell-test-1" unless exists?("shell-test-1")
cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
if !exists?(dir)...