I am looking for a perl/awk/sed
command to auto-increment the number in column 7
Example line in file knownfile.txt:
The file has formatting and 7 columns.
today is a great day and it
is also an amazing day tomorrow now
blahblah foo today build number is 5928
I want to retain all formatting and simply replace 5928
with 5929
and save file
I tried:
awk '/blahblah/{ $7++; print $0 }' filename > tmp && mv tmp filename
It increments the number and I think it retains the formatting, but it only prints the edited line to the file.