Data:
61 -3.5527 1.00000
62 -3.4695 1.00000
63 -3.4545 1.00000
64 -3.1462 1.00000
65 -1.4512 0.00000
66 -1.1737 0.00000
67 -0.8792 0.00000
61 -3.5590 1.00000
62 -3.4763 1.00000
63 -3.4557 1.00000
68 -3.1533 1.00000
69 -1.4382 0.00000
70 -1.1616 0.00000
71 -0.8638 0.00000
What i expect:
file1:
64 -3.1462 1.00000
68 -3.1533 1.00000
file2:
65 -1.4512 0.00000
69 -1.4382 0.00000
I want to get file1 and file2 by using simply bash shell and awk. How do I find the two lines where the values of the 3rd column are changed from 1 to 0? Thx in advance!
cat Data|grep -e '^64 ' > file1
? Or is/are there sometimes space/s at the beginngin of theData
lines? – Dilettant