Open karel-brinda opened 10 months ago
I don't understand how it should work, option -i expects a filename.
See eg https://en.wikipedia.org/wiki/Process_substitution or https://tldp.org/LDP/abs/html/process-sub.html.
In my pipelines, I used them extremely widely; they're much easier and safer than eg named pipes.
An example with xz:
xz --stdout <(printf '>seq\nGGGGGGGGGGGGGGGGGGAAAAAAAAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\n' | cut -c1-10) > a.xz
In this specific case, in can be done in different ways too, but it's just an example of these are commonly used.
For instance, for testing, you can easily replace prog myfile.txt
by prog <(head myfile.txt)
, without changing anything less
I think your example was incorrect. However, in the case of very small inputs and stdin there is a bug and max mode should be used:
$ mbgc c -m3 -i - a.mbgc < <(printf '>seq\nGGGGGGGGGGGGGGGGGGAAAAAAAAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\n')
Switching to single file compression mode.
processed reference dataset - 63 [ms]
matching finished - 68 [ms]
compressed 78 bytes to 408 (523.077% == x0.2)
encoding time - 170 [ms]
I think your example was incorrect.
Which one? The one with xz? I've just tested it and it works on my computers. Might depend on your shell – eg if you use sh, this feature isn't supported (it requires at least bash).
I meant the first one with mbgc.
I think your example was incorrect. However, in the case of very small inputs and stdin there is a bug and max mode should be used:
$ mbgc c -m3 -i - a.mbgc < <(printf '>seq\nGGGGGGGGGGGGGGGGGGAAAAAAAAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\n') Switching to single file compression mode. processed reference dataset - 63 [ms] matching finished - 68 [ms] compressed 78 bytes to 408 (523.077% == x0.2) encoding time - 170 [ms]
@karel-brinda does the form above work for you?
Minimal example: