Question: How to delete all but a certain pattern using sed
0
gravatar for arsilan324
4 days ago by
arsilan32420
arsilan32420 wrote:

How do I get just the link part in the http-source of a link?

I have

gene ORF%20Transcript_2%7Cg.4%20Transcript_2%7Cm.4%20type%3Ainternal%20len%3A102%20%28%2B%29

but I want,

gene Transript_2

I am using mac. Thanks for the help!

Arslan

bash sed • 181 views
ADD COMMENTlink modified 4 days ago by Pierre Lindenbaum103k • written 4 days ago by arsilan32420
0
gravatar for Pierre Lindenbaum
4 days ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum103k wrote:
$ echo 'gene ORF%20Transcript_2%7Cg.4%20Transcript_2%7Cm.4%20type%3Ainternal%20len%3A102%20%28%2B%29' | sed 's/.*%20\(.*\)%7C.*/\1/'
Transcript_2
ADD COMMENTlink written 4 days ago by Pierre Lindenbaum103k

Thank you for the reply! I forgot to mention that it is in the text file, how should i completely write the code mentioning file as well (juncus.tbl)?

ADD REPLYlink written 4 days ago by arsilan32420

, how should i completely write the code mentioning file as well

it's a very basic question, learn linux, read the sed manual.

ADD REPLYlink modified 4 days ago • written 4 days ago by Pierre Lindenbaum103k

I do understand your point but I am actually not a bioinformatics person! If you will just explain, it would be easier for me to go to next step which is crucial.

ADD REPLYlink written 4 days ago by arsilan32420
1

Okay! i got it..thanks

ADD REPLYlink written 4 days ago by arsilan32420
1

I am actually not a bioinformatics person

sorry i didn't want to be picky. There are a lot of students who ask to do their jobs.

ADD REPLYlink written 4 days ago by Pierre Lindenbaum103k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1586 users visited in the last hour