I have a long file (showing only a piece):
145 27262253 2093226 747883433 76303046 2.74331 146 27992017 2188217 747883433 76303046 2.8678 147 30385435 2433407 747883433 76303046 3.18913 148 31218703 2514902 747883433 76303046 3.29594 149 33852828 2660530 747883433 76303046 3.48679 150 36161756 2836045 747883433 76303046 3.71682 Alignments 747883433 76303046 Bases 111613795461 11392665612 1 40000373 2754292 838333186 82982133 3.31914 2 35955786 2451917 838333186 82982133 2.95475 3 33056935 2241392 838333186 82982133 2.70105 4 32241895 2172229 838333186 82982133 2.61771 145 29490370 2184347 838333186 82982133 2.63231 146 30252912 2282821 838333186 82982133 2.75098 147 32862262 2544600 838333186 82982133 3.06644 148 33769718 2631164 838333186 82982133 3.17076 149 36673113 2787718 838333186 82982133 3.35942 150 39222287 2975755 838333186 82982133 3.58602 Alignments 838333186 82982133 Bases 125129342261 12391027833 1 35736929 2509527 741319423 80995147 3.09837 2 32185143 2238927 741319423 80995147 2.76427 3 29595482 2043259 741319423 80995147 2.52269 4 28861157 1978254 741319423 80995147 2.44244 I want to match the blank line before Alignments word and the word itself. Expecting:
Alignments 747883433 76303046 Alignments 838333186 82982133 Is it possible? I have many others blank lines and Alignments words. My try: | awk '{if($1 ~ /^[[:space:]]*Alignments/) {print $0}}'. However, I get:
Alignments 747883433 76303046 Alignments 838333186 82982133