Forum Discussion
Alscion_68122
Aug 02, 2011Nimbostratus
How to use grep in show command
Hi,
I want to retrieve the MAC address of all vlan of all partition and stock them in a file.
I would use the show command : show net vlan $part-vlan-virt | grep "Mac" that return the information I need : Mac Address 0:1:d7:ae:xx:xx
But when I use it in a script and try to put the result in a file I have the following error :
Script : puts $file [tmsh::show net vlan vlan-toto | grep "Mac"]
Error : can't eval proc: "script::run"
unexpected argument "|"
while executing
"tmsh::show net vlan vlan-toto | grep "Mac""
Does anybody have an idea or another solution?
Thks
- Mark_Crosland_2Historic F5 AccountOne of the goals for tmsh scripting was to reduce the amount of screen scraping (run command | grep | grep ...) that had to be done.
- Alscion_68122NimbostratusHoooooo, excellent, I used to use only the command we find under tmsh. All these get_command seems to be powerful and will simplifiy and proper my scipts!!
Is there a document or reference where can I find all [field name] values? (mac-true etc...)
Thanks a lot!
- JRahmAdminall the properties on objects should be defined in the tmsh reference guide:
- Mark_Crosland_2Historic F5 AccountAs I mentioned above, the fields for:
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects