bash - sort files by word in a line -


i have several files this. want sort them px numbers- ascending or descending see file best px value.

8671 words (including </s>), 8671 decompounded words  816 sentence(s), -llh=35158.3217 px=11342.3246, 323 oov (4.11%)  1-gram hits: 5537 (63.86%)  2-gram hits: 2859 (32.97%)  3-gram hits: 258 (2.98%)  4-gram hits: 17 (0.20%) 

is there way use sort commmand px number?(px=11342.3246)

this 1 of few cases use both grep , sed in single pipeline, since getting hold of file name tricky in sed:

grep px= my_files* | sed -r 's/([^:]+):.*px=([0-9.]+).*/\2 \1/' | sort -n 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -