https://dlang.org/library/std/process.html
How do I pipe (|) through three programs using std.process?
I'm getting confused again about what functions should I use to efficiently mimick piping like it is done in some shells (Linux bash, Windows cmd):
Here I will provide something to test against on Windows Operating System.
Shell example on Windows:
echo This is a sample text | find "sample" | find "text"
Output if piping works:
This is a sample text

Output if it does not:

Explanation:
echo is used to print output to stdout.
The output is redirected as input to a find command.
The find "textToFind" command finds matching text in the stdin input.
Windows find command:
- If text matches it returns the whole given input.
- If the text does not match, it returns nothing.
Permalink
Reply