glorksnork has asked for the wisdom of the Perl Monks concerning the following question:

I would like to redirect a file in to another file and see the number of occurrences there are within the file. How would I do this?

Replies are listed 'Best First'.
Re: Redirecting a file to another file
by hippo (Archbishop) on Sep 28, 2017 at 21:09 UTC
    I would like to redirect a file in to another file

    It's not really clear what this means - perhaps you want link?

    and see the number of occurrences there are within the file.

    It's not really clear what this means - perhaps you want grep or just length?

Re: Redirecting a file to another file
by NetWallah (Canon) on Sep 29, 2017 at 05:35 UTC
    Taking a guess at what you mean:

    tee can "redirect", and
    grep (with the -c option) can "see the number of occurrences".

                    All power corrupts, but we need electricity.

Re: Redirecting a file to another file
by Anonymous Monk on Sep 28, 2017 at 21:07 UTC
    Ocurrences of what? What do you mean by "redirect"? Show some sample input and output and the code you've tried.