Forum Discussion
RiverFish_95049
Dec 30, 2014Nimbostratus
I'm having trouble with this one. Maybe it's because I'm running version 11.5.1. Here's what I did:
- Created a file named bash.sh in the /shared folder.
- Ran the following command: chmod 755 /shared/bash.sh
- Ran the following command: bash /shared/bash.sh
The output looked correct, the desired octet was changed:
modify ltm virtual vs-name { destination 10.10.207.x:80 }
But, the actual VS destinations were not changed. Below is the contents of the bash.sh file:
!/bin/bash
tmsh list ltm virtual destination | tr '\n' ' ' \
| sed 's/ \+/ /g;s/ltm virtual/\nmodify ltm virtual/g;s/nation 10\.10\.206/nation 10.10.207/g';echo
- shaggyDec 30, 2014Nimbostratusthe command is meant to generate the commands that can then either be put into a script or run manually. the following should generate a bash script with 'tmsh modify ltm virtual...' commands: echo '!/bin/bash' > /shared/bash2.sh; tmsh list ltm virtual destination | tr '\n' ' ' | sed 's/ \+/ /g;s/ltm virtual/\ntmsh modify ltm virtual/g;s/nation 10\.10\.206/nation 10.10.207/g' >> /shared/bash2.sh; chmod 755 /shared/bash2.sh