cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
753
Views
0
Helpful
1
Replies

IOS.sh fetch command. What does it fetch?

stephengun
Level 1
Level 1

In the IOS shell, there is a command "fetch" (ie, in the terminal shell). The help says:

 

NAME
fetch - return data from a path variable.

SYNOPSIS
fetch <var> <path>

DESCRIPTION
Fetch returns a string from an internal path element
Path elements contain internal operational data

 What are these internal path elements? I cannot find any example of this being used.

1 Reply 1

jsblach
Level 1
Level 1

you see the fetchable data with 'show shell data-path'

you can then e.g.:

fetch vendor //oper/platform/vendor

echo $vendor

it will return "Cisco". Who'd have thought that.

Review Cisco Networking for a $25 gift card