开发者

AWK: How to increment values in a column by one

开发者 https://www.devze.com 2023-01-29 02:57 出处:网络
In a previous question I asked how to decrement the value of all entries in a column by 1 The (correct) answer was

In a previous question I asked how to decrement the value of all entries in a column by 1

The (correct) answer was awk '{ $7--; print $0 }', where $7 means the 7th column

What would an analogous answer for INCREMENTING column v开发者_开发技巧alues be?

Thanks so much

Christian


Use ++ instead of --.

0

精彩评论

暂无评论...
验证码 换一张
取 消