Replacement of Lines in a file -Linux
by ssguru from LinuxQuestions.org on (#5GCTC)
There are several lines (like below) across many files
Format
set -rules XXXX -location {YYYY.v:4} -msg { ZZZZ} -comment {Auto-generated by: FOO on 01-26-2021 10:30:35}
I want to change above to new format
set -rule {XXX} -expression {(Details =~ ZZZZ") && File=~ YYYY.v:4")} -status {Waived} -lastedit_user {FOO} -lastedit_time
{01-26-2021 10:30:35}
Can anyone please let me know how to this in perl or linux command to replace and get to new format


Format
set -rules XXXX -location {YYYY.v:4} -msg { ZZZZ} -comment {Auto-generated by: FOO on 01-26-2021 10:30:35}
I want to change above to new format
set -rule {XXX} -expression {(Details =~ ZZZZ") && File=~ YYYY.v:4")} -status {Waived} -lastedit_user {FOO} -lastedit_time
{01-26-2021 10:30:35}
Can anyone please let me know how to this in perl or linux command to replace and get to new format