<div dir="ltr">I wanted to start a different topic as mine is not about flash or bootflash.<div><br></div><div>I have a similar issue with nexus output and want to prevent diff emails but I want the data in the the saved config.  One of switches will constantly adjust output watts by a few points.  </div><div><br></div><div><div><br></div><div>  !Env: -------  -------------------  ----------  ----------  ----------  --------------</div><div>- !Env: 1        N9K-PAC-650W-B             67 W                   649 W     Ok</div><div>- !Env: 2        N9K-PAC-650W-B             71 W                   649 W     Ok</div><div>+ !Env: 1        N9K-PAC-650W-B             68 W                   649 W     Ok</div><div>+ !Env: 2        N9K-PAC-650W-B             70 W                   649 W     Ok</div><div><br></div><div><br></div><div>My scripting-fu is non-existent and am trying to learn this.  </div><div><br></div><div>I figure I have 3 options.  </div><div>    Just have Rancid ignore the line.  (not preferred as I want to see the PS as OK or not)</div></div><div>    Filter email output.</div><div>    Filter the actual diff.  (can the diff actually handle advanced parsing?  Everything I see shows how to ignore line based on simple match)</div><div><br></div><div>I found this snippet from another thread on how to filter email output but I'm getting lost on what it is doing after the first grep</div><div><font color="black" size="2" face="Verdana,Arial,Helvetica"><font color="black" size="2" face="Verdana,Arial,Helvetica"><font color="#660066">> DIFF=`cat $TMP.diff | grep -v "^===" | grep -v "^diff " | grep -v <br>> "^Index: " | grep -v "^retrieving revision" | grep -v "^$"` <br>>     if [ -n "$DIFF" ]; then <br>> ...email stuff here... <br>> fi </font></font></font><br></div><div><br></div><div>How do I best adjust this so that it greps for the ENV or N9K-PAC line, and ignore (not send diff email) it if the Ok is there.</div><div><br></div><div>Thanks</div><div><br></div></div>