On 01:56 am, jonny.lowe.12...@gmail.com wrote:
Hi everyone,

Is there an easy way to merge stdin and stdout? For instance suppose I
have script that prompts for a number and prints the number. If you
execute this with redirection from a file say input.txt with 42 in the
file, then executing

./myscript < input.txt > output.txt

the output.txt might look like this:

Enter a number:
You entered 42.

What I want is to have an easy way to merge input.txt and the stdout
so that output.txt look like:

Enter a number: 42
You entered 42.

Here, the first 42 is of course from input.txt.

It sounds like you might be looking for script(1)?

Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to