Hello everyone,
I have used grep to process data from this input:
Code:
Scaffolds_16_pilon ACmerged_contig_2215 5_1009.75816 11_1010 11_1011
To that output:
Code:
Scaffolds_16_pilon ACmerged_contig_2215 1 5
Scaffolds_16_pilon ACmerged_contig_2215 2 11
Part of my script is based on selection the correct first number before the underscore in column three and four.
For this I have used the regexp '$f'_.* to select a specific $f followed by underscore, then a variable pattern.
Code:
grep --only-matching '\<'$f'_.*\>' | wc --word
Unfortunately, when $f=5 the script select the three last column and not just the first one. And I don't really understand why. Any idea anyone?