Forum Discussion
Big-IP LTM config Bash scripting question
- Dec 15, 2020
Hi ,
I think I've already put these on the codeshare, feel free to test my script from below links, you can customize them to your requirement too.
https://devcentral.f5.com/s/articles/Export-Virtual-Server-Configuration-in-CSV-tmsh-cli-script
https://devcentral.f5.com/s/articles/Capture-Virtual-Server-Clientssl-Profile-Ciphers-Mapping-Bash
https://devcentral.f5.com/s/articles/Capture-SSL-Profile-Protocol-Stats-Bash
To answer your question, you have to use xargs command in your Irule capture statement. This will convert your multiline output to oneline with spaces inbetween. So it will look like below,
IRULE=`tmsh list ltm virtual ${VAL} rules | awk 'BEGIN {RS="\n}"} !/none/ {print}' | grep -v ' rules \|}' | grep -v ltm.virtual | xargs`
Hope this helps.
Hi ,
I think I've already put these on the codeshare, feel free to test my script from below links, you can customize them to your requirement too.
https://devcentral.f5.com/s/articles/Export-Virtual-Server-Configuration-in-CSV-tmsh-cli-script
https://devcentral.f5.com/s/articles/Capture-Virtual-Server-Clientssl-Profile-Ciphers-Mapping-Bash
https://devcentral.f5.com/s/articles/Capture-SSL-Profile-Protocol-Stats-Bash
To answer your question, you have to use xargs command in your Irule capture statement. This will convert your multiline output to oneline with spaces inbetween. So it will look like below,
IRULE=`tmsh list ltm virtual ${VAL} rules | awk 'BEGIN {RS="\n}"} !/none/ {print}' | grep -v ' rules \|}' | grep -v ltm.virtual | xargs`
Hope this helps.
- Mark_GallagherDec 15, 2020Altocumulus
Hi Jaikumar, thanks so much! piping the output of the irule capture to xargs worked a treat!
Recent Discussions
Related Content
* 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