Forum Discussion
Mahi
Nov 14, 2019Cirrus
Setting $hostname variable
Hello, I want to setup the environment variable referring the hostname of the current device and use it in multiple commands such as tcpdump as follows. tcpdump -nni 0.0 -s0 -w /var/tmp/$hostn...
Mahi
Nov 15, 2019Cirrus
Thank you, I was looking for something like this. While it worked for 'tcpdump', it didn't for taking UCS archive via CLI.
(tmos)# save /sys ucs $HOSTNAME
Error, invalid characters in UCS file name. The dash, period, forward-slash, plus sign, and underscore are the only special characters allowed.
Error during config save.
Unexpected Error: UCS saving process failed.
- TimRikerNov 15, 2019Cirrocumulus
I'm not sure how to reference variables in tmsh. This works though:
# tmsh save /sys ucs $HOSTNAME-$(date +%Y%m%d%H%M)
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