Hi, I want to change on a file this line:
vif = [ 'ip=167.112.194.243,mac=00:16:3E:CE:23:14' ]
into:
vif = [ 'ip=167.112.194.243,mac=00:16:3E:CE:23:14,vifname=veth216','ip=10.1.1.1,mac=00:16:3E:FD:58:BB,vifnam e=veth216a']
But there are some conditionals:
1. last part '] of the original line after 00:16:3E:CE:23:14' ] may vary to 00:16:3E:CE:23:14' ] or 00:16:3E:CE:23:14 ' ]
2. The second mac adrress of the line I need, 00:16:3E:FD:58:BB, must be different every time I run sed. Maybe just changing the last two characters BB to other two characters.
3. The [ ' and ' ] of both lines could be separated by some espaces, example [ ' or [' or ' ] or '] so you should not take this characters as a reference.
4. The Ip 167.xx.xx.xx and first mac address 00:16:3E:CE:23:14 are the same in two line. The second ip always is 10.1.1.1, and the second mac address must change every time I run sed command.
thanks tons
regards,
Israel.