Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Cat multiple files into one pipe

by pzbagel (Chaplain)
on Apr 25, 2003 at 04:03 UTC ( #253062=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://253062]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2022-07-05 19:31 GMT
Find Nodes?
    Voting Booth?

    No recent polls found