Attribute number every time a given character shows
Hey,
I have a text file with
1_Ab
2_Cd
3_Ab
4_Cd
5_Ef
6_Ef
And would like to attribute number every time a given character shows up (Ab, Cd, Ef, etc.), so that the attributed numbers appear next to the text, like this
1_Ab 1
2_Cd 2
3_Ab 1
4_Cd 2
5_Ef 3
6_Ef 3
Can you help me with this? Thanks!
• 269 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Hello genomes_and_MGEs!
We believe that this post does not fit the main topic of this site.
Not obviously related to bioinformatics, and zero effort shown.
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!
Hello, you have been asked in many of your previous posts to please show effort (=what you tried) which you refuse to do. Biostars is actually not a code-writing service, and it is not obvious how this is even bioinformatics-related.