Forum Discussion

Darren_Walker_2's avatar
Sep 19, 2017

Edit existing internal data-group

I want to edit an existing internal data-group by finding all the values that are http:// and changing them to https:// (this data group is used for redirects). I'm on 12.1.2 and found the tmsh ref guide for ltm data-group:

 

edit internal [ [ [name] | [glob] | [regex] ] ... ] all-properties non-default-properties

 

How can I do a find and replace using these commands?

 

2 Replies

  • The TMSH edit command you reference uses the VI editor. It's a simple matter of using the VI editor's find and replace command which, if memory serves, is ":%s/pattern/replace/"

     

    I'm not what I would call a VI editor wizard though. Check here.

     

  • I figured out I can add records like so (from tmsh ltm data-group module):

    modify internal MyDG records add { my_key1 {data http://1my_value}}

    and then I can modify the record:

    modify internal MyDG records modify { my_key1 {data https://1my_value}}

    Changing the data from http:// to https://