I'd like to divide the values of the second column by its last entry (here 9.82197e-08).
I would be thankful if someone could show me how to do it in Linux.
Thanks!
"Do it in Linux" is somewhat ambiguous. Do you want to deploy a shell script, an awk (or other tool) script? Any attempts/thoughts/ideas from your side?
Sorry, I should have been more clear.
I searched in the forum and I saw a similar post as mine by for dividing a column by its first number using awk. here is what was suggested:
This may work on some but not all awk versions depending on the NR and $2 values being retained in the END section or not.
For larger files, you might want to extract the last line with e.g. tail , or reverse the overall line order with tac , or run through the file twice.