cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
553
Views
0
Helpful
3
Replies

Redirect show command output

jms112080
Level 1
Level 1

Is it possible to use "show <command> | include example" and then output (tee) the results to file? I've tried multiple variations with no luck so far, just wondering if there is some special way you have to enter the command to combine the two options.

3 Replies 3

Jon Marshall
Hall of Fame
Hall of Fame

Mark Yeates
Level 7
Level 7

Jeremy,

I don't think a "| tee" can be used in conjunction with another pipe.

- With one tee it works just fine

Router#sh log | tee tftp://10.10.1.105/logtest.txt

- When I question mark after an exclusion it does not display the tee option.

Router#sh run | exc una ?

LINE

- This shows the running config but does not tee to the TFTP server

Router#sh run | exc una | tee tftp://10.10.1.105/test123.txt

HTH,

Mark

nicolas.vallot
Level 1
Level 1

Hi Folks,

This is an old thread but was never resolved.

I'm trying the exact same thing and it doesn't work

show run | include hostname | redirect tftp://192.168.0.1/output.txt

Any clue how I can display the hostname of the device with a simple show command ?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: