Switching

Expand all | Collapse all

Smart Port listing command

Jump to Best Answer
  • 1.  Smart Port listing command

     
    Posted 08-11-2019 17:27

    Hi all,

    1-) As you see there is list below... How to listed only ge-0/0/1 one? I tried ge-0/0/[^1$] but didn't work.

    >show configuration interfaces | display set | match ge-0/0/1
    set interfaces ge-0/0/1 description "xxxxx_Connected_2_GatewaycVM_01"
    set interfaces ge-0/0/1 unit 0 family ethernet-switching
    set interfaces ge-0/0/10 unit 0 family ethernet-switching
    set interfaces ge-0/0/11 unit 0 family ethernet-switching
    set interfaces ge-0/0/12 description "YYYY_Connected_2_GW415_03"
    set interfaces ge-0/0/12 unit 0 family ethernet-switching
    set interfaces ge-0/0/13 unit 0 family ethernet-switching
    set interfaces ge-0/0/14 unit 0 family ethernet-switching
    set interfaces ge-0/0/15 unit 0 family ethernet-switching
    set interfaces ge-0/0/16 unit 0 family ethernet-switching
    set interfaces ge-0/0/17 unit 0 family ethernet-switching
    set interfaces ge-0/0/18 unit 0 family ethernet-switching
    set interfaces ge-0/0/19 unit 0 family ethernet-switching

    2-) How to listed ONLY ge-0/0/1, ge-0/0/2, ge-0/0/25, ge-0/0/31 and ge-0/0/45 ports? But not like this ge-0/0/1[x]



  • 2.  RE: Smart Port listing command
    Best Answer

    Posted 08-11-2019 18:22

    try with space

    show configuration interfaces | display set | match "xe-0/0/1 "



  • 3.  RE: Smart Port listing command

    Posted 08-12-2019 01:34

    Hello,

     


    @Arix wrote:

    Hi all,

     

    2-) How to listed ONLY ge-0/0/1, ge-0/0/2, ge-0/0/25, ge-0/0/31 and ge-0/0/45 ports? 


     

    This should help:

     

     

    show configuration | display set | match "ge-0/0/1 |ge-0/0/2 |ge-0/0/25|ge-0/0/31|ge-0/0/45"

     

     

    If You know You don't have FPC1 nor PIC1 (only FPC 0 PIC0), then You can shorten the expression:

     

    show configuration | display set | match "ge-" | match "/1 |/2 |/25|/31|/45"

    HTH

    Thx

    Alex



  • 4.  RE: Smart Port listing command

     
    Posted 08-13-2019 02:09

    Thanks 

    Both are really good.

    Accendently I found the followings with a space like what Akushner pointed.....

    >sh conf int | dis se | matc "ge-0/0/[1:2:25:31:45] "

    >sh int terse | matc "ge-0/0/[1:2:25:31:45] "

     

    really many thanks again for those techniques.