- Community Home
- >
- Networking
- >
- IMC
- >
- Re: CLI Script with hostname variable
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2018 06:36 AM
01-29-2018 06:36 AM
Hi everyone,
is there a way to run f.e. the following command:
copy command-output "sh tech all" tftp 192.168.10.10 tech_all_${hostname}_20180129.txt Where ${hostname} is the hostname of the device the script is running on?
I can configure variables per device, but then I could as well just type the script in every device per hand.
The tooltip states I could enter MIB variables, but I can't find a way to use that.
2.Input MIB parameter, according with $(mibName|mibVariable|index).
For example: $(H3C-SYS-MAN-MIB|h3cSysImageSize|65537) or $(H3C-SYS-MAN-MIB|h3cSysImageSize|@(H3C-SYS-MAN-MIB|h3cSysReloadImage|65536)).
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2018 08:58 AM - edited 01-29-2018 08:59 AM
01-29-2018 08:58 AM - edited 01-29-2018 08:59 AM
SolutionYou could try using the sysName MIB.
Something like this I think:
$(SNMPv2-MIB|sysName|0)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2018 07:34 AM
01-31-2018 07:34 AM
Re: CLI Script with hostname variable
Hi,
it works, thanks a lot ^^