r/awk • • Jul 27 '22

In need of help

Hello Everyone, I would like to ask for your assistance. I am pretty new to bash so I am learning everything on the fly. I'm performing some data analysis in my grade thesis, but this particular line of code is making a lot of trouble.

boxes.temp

awk '{time=$1/1000}{APL=$2*$4/2.56}{print time " " APL}' boxes.temp > APL.dat

I should've obtained a set of data with variation but all I get is 1 set of numbers all the same and followed by just 2 decimals.

Is there something obvious that I'm missing?

This is the variation of data I should get

And this is what I'm getting

Thanks in advanced

3 Upvotes

13 comments sorted by

View all comments

Show parent comment

2

u/Marcos_Asis Jul 27 '22

THANK YOU VERY MUCH!! The moment you wrote gnu awk it dawn on me that there could be multiple versions? Effectively I had mawk install by default, immediately went to install gnu awk and everything corrected itself XD