Say I have a file with 30 columns and I want to add 1 to the number in column 15, but otherwise print the line as is. Is there a better way to do this then something like
perl -lane' print "$F\t$F\t$F....\t" .$F+1 . "\t$F .....\t$F"' file.txt
The dots representing $Fx\t ( or everything in-between)
Any ideas? the shorter the better. Also i was thinking maybe a tricky substation might work but this could get difficult with more complex operations. Still.... open to any suggestions Thanks for your time.