⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Open3
/
Edit File: pipeline-c.ri
U:RDoc::AnyMethod[iI" pipeline:ETI"Open3::pipeline;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"=Open3.pipeline starts a list of commands as a pipeline. ;TI"2It waits for the completion of the commands. ;TI"=No pipes are created for stdin of the first command and ;TI" stdout of the last command.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"<status_list = Open3.pipeline(cmd1, cmd2, ... [, opts]) ;T:@format0o; ; [I"'Each cmd is a string or an array. ;TI"AIf it is an array, the elements are passed to Process.spawn.;T@o;; [I" cmd: ;TI"_ commandline command line string which is passed to a shell ;TI"_ [env, commandline, opts] command line string which is passed to a shell ;TI"b [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell) ;TI"h [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell) ;TI" ;TI"<Note that env and opts are optional, as Process.spawn. ;T; 0o; ; [I" Example:;T@o;; [$I"-fname = "/usr/share/man/man1/ruby.1.gz" ;TI"=p Open3.pipeline(["zcat", fname], "nroff -man", "less") ;TI"0#=> [#<Process::Status: pid 11817 exit 0>, ;TI"0# #<Process::Status: pid 11820 exit 0>, ;TI"0# #<Process::Status: pid 11828 exit 0>] ;TI" ;TI"+fname = "/usr/share/man/man1/ls.1.gz" ;TI"=Open3.pipeline(["zcat", fname], "nroff -man", "colcrt") ;TI" ;TI"6# convert PDF to PS and send to a printer by lpr ;TI"pdf_file = "paper.pdf" ;TI"printer = "printer-name" ;TI"0Open3.pipeline(["pdftops", pdf_file, "-"], ;TI"- ["lpr", "-P#{printer}"]) ;TI" ;TI"# count lines ;TI"HOpen3.pipeline("sort", "uniq -c", :in=>"names.txt", :out=>"count") ;TI" ;TI"# cyclic pipeline ;TI"r,w = IO.pipe ;TI"w.print "ibase=14\n10\n" ;TI";Open3.pipeline("bc", "tee /dev/tty", :in=>r, :out=>w) ;TI"#=> 14 ;TI"# 18 ;TI"# 22 ;TI"# 30 ;TI"# 42 ;TI"# 58 ;TI"# 78 ;TI" # 106 ;TI"# 202;T; 0: @fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*cmds);T@FFI" Open3;TcRDoc::NormalModule00
Simpan