I have list of group name in the following file.
$ cat group_list.txt
member/brazil/linux/team
member/london/windows/team
member/china/bootloader/team
member/india/message/team
member/romania/mac/team
........
...........
Then i have groups
file (in below given format) in many of our git repositories and i need to search in all repositories of groups file with the group name for example member/brazil/linux/team
if group name exists in group file, then it need to replace with new UUID
.
$ cat groups
# UUID Group Name
#
b16e145bac197a36802a31c5886ad726ee4f38c4 member/brazil/linux/team
With the below command for each group i get its new UUID
$ ssh -p 29418 review.example.com gerrit ls-groups -v | awk '-F\t' '$1 == "member/brazil/linux/team" {print $2}'
ef02b22ac4ce179a0064b1df2b326fd6b5dce514
Expected output for one groups file:-
$ cat groups
# UUID Group Name
#
ef02b22ac4ce179a0064b1df2b326fd6b5dce514 member/brazil/linux/team
Need help to replace each of my current UUIDs with the new ones in an automated way.
@tshiono, Requested output as follows.
$ ssh -p 29418 review.example.com gerrit ls-groups -v
member/brazil/linux/team b16e145bac197a36802a31c5886ad726ee4f38c4 member/brazil/linux/team b16e145bac197a36802a31c5886ad726ee4f38c4 false
member/london/windows/team 3cab73598a48f443c8ca21fb77b1ea42ef00cbe6 member/london/windows/team 3cab73598a48f443c8ca21fb77b1ea42ef00cbe6 false
............
............................