Forum Discussion
Merry95_171142
Nimbostratus
Dec 01, 2014run a list of tmsh commands (copy - paste) failed
Hello,
I have created an automatic VBA script to generate a list of pool from a .xls file.
It codes a list of commands tmsh to create the associated pools. The list is written in txt forma...
shaggy
Nimbostratus
Dec 01, 2014if you have bash access on the F5 (from tmsh, run "run /util bash"), you can create and execute a bash script out of the tmsh commands:
- preface each command with "tmsh" so each command can be run from bash
- add !/bin/bash as the first line of the text file
- upload the file containing the commands to /shared/(filename).sh using SCP
- from bash on the f5, make the script executable
chmod 755 /shared/(filename).sh - execute the script
bash /shared/(filename).sh - once you validate that the resulting configuration is what you desired/expected, save the config
tmsh save /sys config partitions all
i often use this instead of copying/pasting commands as error output is the only thing output to the screen and is not lost among the list of commands being run
mushair_264331
Nimbostratus
May 17, 2016Hey Shaggy,
Hope you can help here.
my test file has this:
!/bin/bash
tmsh save /sys ucs backup
I am getting "line: 3) incomplete command"
And If I remove "" from line 2 i get: line: 2) "tmsh" unexpected argument.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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