Forum Discussion
JQUINONES82NB
Nimbostratus
Jan 11, 2019LTM script modification
Was wondering if a SED Guru could help me but looking to transform a certain lines of configs in my f5 configuration using bash. i will have another file with an ip address mapping to do modificatio...
JQUINONES82NB
Nimbostratus
Jan 16, 2019cat f5_pool_orig.txt | sed 's/ltm/tmsh modify ltm/g;s/{\saddress\s[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}//g;s/session[^}]//g;s/monitor[^}]//g;s/members/members add/g;s/} 1/1/g;s/} } }/} }/g'
This assumes we have the pools already there and are changing adding the ips. Will finish testing it but at first glance looks ok.
This will parse the running config to commands. I can move to a file. Then I can use an external mappings file to do sed on it and I can then execute the commands to add the new pool members.
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