From: MonkeeSage Date: 2007-11-25T14:19:59+09:00 Subject: Re: Piping problem On Nov 24, 10:52 am, Pawel Radecki wrote: > Now I want to execute it on the Windows XP box with a pipe to redirect > results so I know that: > > reverse.rb sample.txt | reverse.rb Well, you've defined reverse.rb to read from stdin, but you're passing it a file with no stdin. I think in XP there is a "type" command that does what "cat" does on posix systems (outputs contents of file to stdout), so I think you want this: type sample.txt | reverse.rb | reverse.rb I don't have an XP box to test on, but that works with "cat" on linux. (Ps. Does XP's cmd.exe support pipes "|"? Or are you using cygwin or something similar? (If so, you may have a version of "cat" available.)) Regards, Jordan