in reply to Re: Combining files
in thread Combining files

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: Combining files
by Anonymous Monk on Oct 02, 2009 at 12:21 UTC
    This works perfectly. Can it be updated so that the any line with only ''Total' and then a number' is not included?

    Yes. Can you guess how?

      Using Perl? Perhaps I need to write a Perl program in to do that step. The Perl program one liner could have a system call in it. Maybe actually it would be better if a Perl execution was incorporated into the DOS prompt argument? Maybe something like:

      type *>"perl -w while(<STDIN>){$_ =! /Total\s\d{1,5}/g;}}" >..\newFile #This is rubbish I know. Just as an example though.

        Use pipe "|" instead of ">" to pass data from one program to another:

        type * | perl -ne "print unless /^Total\s\d{1,5}/" > ..\newFile

        Using only Perl:

        perl -e "while (<*>) {open(F,$_) or next;while(<F>){print unless /^Tot +al\s\d{1,5}/}}" > ..\newFile

        Note: this code has errors, but works as an example.