Question: How to delete all but a certain pattern using sed
0
gravatar for arsilan324
14 months ago by
arsilan32470
arsilan32470 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 • 448 views
ADD COMMENTlink modified 14 months ago by Pierre Lindenbaum118k • written 14 months ago by arsilan32470
0
gravatar for Pierre Lindenbaum
14 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum118k 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 14 months ago by Pierre Lindenbaum118k

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 14 months ago by arsilan32470

, 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 14 months ago • written 14 months ago by Pierre Lindenbaum118k

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 14 months ago by arsilan32470
1

Okay! i got it..thanks

ADD REPLYlink written 14 months ago by arsilan32470
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 14 months ago by Pierre Lindenbaum118k
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: 1619 users visited in the last hour