- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 02:47 PM
good night to everybody,
i wannabe make a show comando with
sh int ra | incl Gig0/1-2
i try this comands
*** sh ru | incl GigabitEthernet0/
this is the command but the responde dont get any more information, like ip address, etc.
the command is more like this
sh ru | incl GigabitEthernet0/ | incl dupl | incl ip addre
Solved! Go to Solution.
- Labels:
-
Catalyst 2000
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2022 03:19 AM
Hello,
unfortunately, you cannot combine multiple exc/inc pipes (such as GREP in Unix).
In your case, if you just want to include Gi0/1 and Gi0/2, you could use something like:
sh interfaces | include GigabitEthernet0/[1-2]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2022 12:12 AM
sh int ra - is this command work (without pipe)
Can you post your example output of what you looking to achieve so we can suggest the best suitable command?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2022 01:36 AM
Hello,
what information are you after exactly ? The 'section' keyword would render this:
#sh run | section GigabitEthernet0/0
interface GigabitEthernet0/0
ip address 1.1.1.1 255.255.255.252
duplex auto
speed auto
media-type rj45
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2022 01:54 AM
i wanna use a lot of "pipes" inside a show ip command, like this:
# sh ip int br | excl vlan1 | sec inc Gi | exc GigabitEthernet0/0
but when i put 2 exclude in show command, the show dont work.
the show command omit 1 exclude.
in a scenario with 3 Gigabits interface and 1 vlan.
i wanna show just the g0/1 and g0/2, exclude of the exit of show command
the g0/0 and vlan.
but when i use 2 excludes in the same line, dont work.
i attached a image of what im talking about.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2022 03:19 AM
Hello,
unfortunately, you cannot combine multiple exc/inc pipes (such as GREP in Unix).
In your case, if you just want to include Gi0/1 and Gi0/2, you could use something like:
sh interfaces | include GigabitEthernet0/[1-2]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2022 04:37 AM
Router#sh ip int br | include GigabitEthernet0/0/[1-2]
GigabitEthernet0/0/1 192.168.1.1 YES manual up down
GigabitEthernet0/0/2 192.168.2.1 YES manual up down
have a very good day!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2022 03:33 AM
we do not see any image attached to.
you can mix so many command in one line due to limitation of IOS code.
out of the box with some python code you get what you looking to do.
