I want to increase all numbers in file by 1000 with follow pattern:
'... comment_count') VALUES ( 15132, ...
'... comment_count') VALUES ( 15133, ...
'... comment_count') VALUES ( 16134, ...
.
.
I want after change output be like this:
'... comment_count') VALUES ( 16132, ...
'... comment_count') VALUES ( 16133, ...
'... comment_count') VALUES ( 17134, ...
.
.
I tried something like this but not work:
sed -r 's/`comment_count`) VALUES ( (d+)/echo "11$((1+1000))"/ge' test.txt
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…