http://qs1969.pair.com?node_id=253062


in reply to Cat multiple files into one pipe

I have some bad news, the script works the way you want it to on my system. That is, I am testing with three short text files and in the first line, I simply open "| cat". That works and cats out the three files as expected.

So as it stands, the logic you are using works for piping to cat. Can you get more specific on what you are piping your files into? This may be the source of the problem.

Replies are listed 'Best First'.
Re: Re: Cat multiple files into one pipe
by ehdonhon (Curate) on Apr 25, 2003 at 04:09 UTC

    I'm piping http log files into wusage

    My open command looks like this:

    open ( SCRIPT, "| /usr/local/bin/wusage -c ${domain}.conf -l -" ) or d +ie $!;

      Question: If you manually cat those files together and pipe to your program, does it work. That is:

      cat /my/files/dir/* |/usr/local/bin/wusage etc...

      Let's see if this is the perl script that is in fact failing.

        I have a mixture of regular files and files that are gziped. I need to be able to pipe all of them to the program uncompressed. Using cat will not do that form. Unfortunately, unzipping them to the disk and then cat'ing them is not an option either.