I have the following text:
SendNoticeMsg (api.post = "/test/SendNoticeMsg")
GenerateMsg (api.post = "/test/GenerateMsg")
GetUserLastAction (api.post = "/test/GetUserLastAction")
And I want to change the text to be:
SendNoticeMsg (api.post = "/test/send_notice_msg")
GenerateMsg (api.post = "/test/generate_msg")
GetUserLastAction (api.post = "/test/get_user_last_action")
Description: I just want to change the URL path to a valid underscore style, so the solution shouldn't change any other irrelevant characters.
I tried use the sed script:
sed -E 's/(\/test\/.*)([A-Z]).*\"/\1\2_\L/'
But it not works.