るりまサーチ

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

別のキーワード

  1. kernel $-l
  2. matrix l
  3. _builtin $-l
  4. lupdecomposition l
  5. l matrix

ライブラリ

クラス

キーワード

検索結果

shell (44096.0)

Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。

...プル

==== Example 1:

require 'shell'
sh = Shell.cd("/tmp")
sh.mkdir "shell-test-1" unless sh.exists?("shell-test-1")
sh.cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
unless sh.exists?(dir)
sh.mkdir dir
sh.cd(dir) do
f = sh.open("tmpFile", "w")
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)
m...
...kdir dir
cd(dir) do
f = open("tmpFile", "w")
f.print "TEST\n"
f.close
end
print pwd
end
end
end

==== Example 3: Using Pipe

require 'shell'
sh = Shell.new
sh.cat("/etc/printcap") | sh.tee("tee1") > "tee2"
(sh.cat < "/etc/prin...

Shell#pwd -> String (35113.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

Shell.new(pwd = Dir.pwd, umask = nil) -> Shell (20453.0)

プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShellオ ブジェクトを生成します.

...ディレクトリをpwd で指定されたディレクトリとするShell
ブジェクトを生成します.

@param pwd プロセスのカレントディレクトリをpwd で指定されたディレクトリとします。
指定しない場合は、Dir.pwd が使用されます。...

Shell#cwd -> String (20013.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

Shell#dir -> String (20013.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

絞り込み条件を変える

Shell#getwd -> String (20013.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...