CommandsPipeline type

Undocumented

Methods

$()(cp:CommandsPipeline) Source: stdlib.ngs:6846
Run external processes described by the commands pipeline. Waits for the commands to finish unless "&" is specified.

Automatically called by NGS for syntax

$(my_prog) , $(some | programs)

Returns

Process

Example

if $(test -f /myfile) { ... }
# or
p = $(node main.js serve &)
YOUR_TESTS_OF_NODE_SERVER_HERE
p.kill()
$[](cp:CommandsPipeline) Source: stdlib.ngs:6941
Same as $(top_level:: ...) - run the commands without capturing the stdout/stderr. Use the same stdout/stderr as the parent process (your script).
%()(cp:CommandsPipeline) Source: stdlib.ngs:7141
Returns cp, wihout any processing. Convenient way to pass ready-to-run Command as an argument

Automatically called by NGS for syntax

%(my_command) , %(my_command | my_other_command)

Example

F run_when_needed(cp:CommandsPipeline) { ... $(cp) ... }
...
run_when_needed(%(ls >/tmp/my_ls))
=~(x:DecodeHints, cp:CommandsPipeline, mc:MatchContext) Source: stdlib.ngs:7050
Undocumented
=~(x:Process, cp:CommandsPipeline, mc:MatchContext) Source: stdlib.ngs:7070
Match process based on argv and options
``(cp:CommandsPipeline) Source: stdlib.ngs:6986
Get command standard output. Similar to bash. Does not strip trailing new line character(s) `line:true my_command` will return the first line, stripping trailing new line character(s)

Automatically called by NGS for syntax

`my_command` , `my_command | my_other_command`
````(cp:CommandsPipeline) Source: stdlib.ngs:7004
Get command standard output and decode() it.

Automatically called by NGS for syntax

``my_command`` , ``my_command | my_other_command``

Returns

structured data when the output can be parsed.

Example

``aws ec2 describe-instances`` is Arr  # true
``aws ec2 describe-instances``.InstanceId.map(X[0..3]).join(",")  # i-3, i-9, i-8, i-a, i-7, ...
init(pp:ProcessesPipeline, cp:CommandsPipeline) Source: stdlib.ngs:5971
Undocumented
inspect(path:Arr, cp:CommandsPipeline)internal Source: stdlib.ngs:644
Internal method. Please do not use. Inspect CommandsPipeline

Returns

Arr of Str
run(r:AWS::Res, log_pfx:Str, cp:CommandsPipeline, do_decode:Any=true)internal
Run a command. Internal method. Please do not use outside the AWS library.
run(rd:AWS::ResDef, log_pfx:Str, cp:CommandsPipeline, do_decode:Any=true)internal
Run an external command related to the resource definition. Will not run the command if rd.dry_run is true.

Parameters

do_decodeWhether to decode the output

Returns

Either parsed output or finished CommandsPipeline (processes in CommandsPipeline finished)
run(r:AWS2::Res, log_pfx:Str, cp:CommandsPipeline, do_decode:Any=true)internal
Run a command. Internal method. Please do not use outside the AWS library.
run(rd:AWS2::ResDef, log_pfx:Str, cp:CommandsPipeline, do_decode:Any=true)internal
Run an external command related to the resource definition. Will not run the command if rd.dry_run is true.

Parameters

do_decodeWhether to decode the output

Returns

Either parsed output or finished CommandsPipeline (processes in CommandsPipeline finished)
AWS2::regions(cp:CommandsPipeline, regs:Arr=[])
Undocumented