Hi janasec,

As a Perl one-liner:

$ echo '2015/07/25 23:01:48 Test1:pass cfgshow Defined configuration: > cfg: FC_DVT MEZZI; MEZZI1 > zone: MEZZI mezzi1; mezzi2; sanblaze > zone: MEZZI1 mezzi3; mezzi4; sanblaze > zone: vikash_enfield > 10:00:00:00:c9:a1:95:aa; 10:00:00:00:c9:a1:95:ab; > 20:00:00:11:0d:34:56:00 > alias: mezzi1 10:00:00:00:c9:cd:cc:6c > alias: mezzi2 10:00:00:00:c9:cd:cc:6d > alias: mezzi3 10:00:00:90:fa:2e:dd:9f > alias: mezzi4 10:00:00:90:fa:2e:dd:a0 > alias: sanblaze > 20:01:00:11:0d:34:57:00 > > Effective configuration: > cfg: FC_DVT > zone: MEZZI 10:00:00:00:c9:cd:cc:6c > 10:00:00:00:c9:cd:cc:6d > 20:01:00:11:0d:34:57:00 > zone: MEZZI1 10:00:00:90:fa:2e:dd:9f > 10:00:00:90:fa:2e:dd:a0 > 20:01:00:11:0d:34:57:00 > ' | perl -e 'print grep /FC_DVT/, <>;' cfg: FC_DVT MEZZI; MEZZI1 cfg: FC_DVT

In reply to Re: issue with grep in the output of a command by Laurent_R
in thread issue with grep in the output of a command by janasec

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.