Discover Packages
github.com/ToolPackage/pipe
command
module
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Nov 11, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
pipe
A command util package. Download here: Pipe! .
Commands
in & out
examples:
read from stdin and output to stdout:
echo asd | pipe in=out
read from file and output to file:
pipe in('file', './test.txt')=out('file', './test1.txt')
use text as input:
pipe in('text', 'hello world')=out
use label parameters:
echo asd | pipe in=out(type:'file', filename:'./test1.txt')
base64
examples:
gzip
examples:
compress:
echo asd | pipe in=gzip.compress=out('file', './test.gzip')
decompress:
pipe in(type: 'file', './test.gzip')=gzip.decompress=out
json
examples:
pretty:
pipe in('file', './test.json')=json.pretty=out
get: need one parameter to indicate json path, more details see gjson
echo "{"name":{"first":[-999]}}" | pipe in=json.get('name.fisrt.0')=out
About command paramter
For now, pipe supports three kinds of command parameter:
number: including integer and float
string: wrapped by '
bool: true or false
NOTE: String parameter doesn't accept spacing character! , most terminal will recogonize space as a separator of two arguments and split them into a string array, so space in a string parameter will be removed.
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.