merge stdin, stdout?
jonny.lowe.12345 at gmail.com
Sun Feb 7 00:41:09 CET 2010
On Feb 5, 11:10 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
> En Fri, 05 Feb 2010 17:39:07 -0300, jonny lowe
> <jonny.lowe.12... at gmail.com> escribió:
> > On Feb 4, 8:20 pm, exar... at twistedmatrix.com wrote:
> >> On 01:56 am, jonny.lowe.12... at gmail.com wrote:
> >> >What I want is to have an easy way tomergeinput.txt and thestdout
> >> >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 forscript(1)?
> > $ script -c "./y < input.txt" output.txt
> > Script started, file is output.txt
> > gimme x:you entered hello
> > Script done, file is output.txt
> Try moving the redirection out of the command:
> $ script -c ./y output.txt < input.txt
> Gabriel Genellina- Hide quoted text -
> - Show quoted text -
The result is the same as before. I've tested in fedora11.
More information about the Python-list