in reply to Re^2: diff not working as it should
in thread diff not working as it should

Play with the STYLE option, or simply apply a grep or a regexp m!(^\|\||^\*)! to the output line by line

Replies are listed 'Best First'.
Re^4: diff not working as it should
by tale051258 (Initiate) on Dec 23, 2011 at 18:39 UTC
    Not seeing much on the STYLE option.
    I can use the regex m/(^\*)/ and that gives me what I need for the most part.
    But where in the code can I use this regex? That is, can it be used as part of the diff command, as in { sub (m/(^\*)/) } ? (yes, I know this is not syntactically correct but you get the idea.)
    Cheers!

      you have two lines of code, so it should be easy to choose... start just in the third line

      open the output file enter a loop reading line by line print only the matching lines close and reopen send it again to the file and you have it.
        Yes, I understand -- and have gone ahead -- and did the regex with some extra code after the diff(). And I thank you for your input.
        I was just wondering if there was some way to do the regex within the diff command or diff command options (I don't see anything at first glance.)
        Cheers!