Closed omac777 closed 4 years ago
The |
pipelines in Crush do not generally transfer binary data, they transfer structured data. To redirect it to/from a file, it would need to be serialized/deserialized, so standard IO redirection like in bash becomes pointless. Currently, the syntax for doing so is the to
and from
methods of the file type, as such:
./file_list:to (ls)
./file_list:from
user size modified type file
liljencrantz 1386 2020-04-02 23:41:10 +0200 file ideas
liljencrantz 4096 2019-11-22 21:56:30 +0100 directory target
...
I noticed your use of the '|' to enclose hold the usual move incoming command line arguments into owned memory variables.
I also distinguished your use of the same '|' to redirect the standard output to the following tool. Your work is innovative because you're taking some of the rust syntax and putting into something that looks like bash.
Where I perceive limitations are the redirecting of stdout(standard output) and stderr(standard error) both of them to different things. I think it is doable. Will you break the existing convention when you integrate this capability in your tool?
Example to redirect stdout/stderr two different files:
Example to redirect stdout/stderr into same file:
A proposal of acceptable crush syntax: