[Edit] Thanks to Barton for pointing out the mistake. Corrected version:
cat tmp.txt | grep td | sed 's/| \([0-9]\.[0-9]\).*/\1/g' > newtmp.txt
sed -n '2,${p;n;n}' newtmp.txt > final.txt; rm newtmp.txt
The first line will pick out the digit.digit pattern after td on each line.
The second line prints every third line starting from the second line (which effectively gives you the second line out of every group of three in the file).
|