How to give data to another programme from the programme i create

I would like to create a brute force programme. And i would like to test it in a programme that asks for password. So in order to brute force it i must be able to provide the output of each combination to the programme to be cracked. My question is how to channel the output.

Pipes and redirection is the first option:
grep bar foo.txt | sort

That | binds the stdout of grep into stdin of sort; the output of first program becomes the input to the second program.

Alternatively, first program executes the second program and buffers the streams of the second program. Then you can operate on both input and output.
Topic archived. No new replies allowed.