I have been in DevOps related jobs for past 6 years dealing mainly with Kubernetes in AWS and on-premise as well. I spent quite a lot …
:date_long | 1 min Read
Vim increment number at irregular rows
[{
"payload": {
"data": {
"vlan_id": 27,
...
}
},
"_response": 200,
...
"_iteration": 0 <---
}, {
"payload": {
"data": {
"vlan_id": 27,
...
}
},
"_response": 400,
...
"_iteration": 0. <---
:let c=1 | g/_iteration/ s/\d\+/\=c/ | let c+=1
**Result''
[{
"payload": {
"data": {
"vlan_id": 27,
...
}
},
"_response": 200,
...
"_iteration": 1
}, {
"payload": {
"data": {
"vlan_id": 27,
...
}
},
"_response": 400,
...
"_iteration": 2
...