linux - drop part of string in awk after specified symbol -


i have field this:

"1427842735.300406","fp": 

this timestamp , obsolete info. need extract timestamp before dot.

i don't want below because timestamp consist different amount of digits:

awk '{print substr($4, 2, 10)}' 

so want take 2-nd symbol till dot. should use match() last arg find index? if - please provide example.

or there easiest way so?

thanks.

$ echo '"1427842735.300406","fpu":' | awk -f'[".]' '{print $2}' 1427842735 

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -