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

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 8 months ago by arsilan32460

, 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 8 months ago • written 8 months ago by Pierre Lindenbaum112k

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 8 months ago by arsilan32460
1

Okay! i got it..thanks

ADD REPLYlink written 8 months ago by arsilan32460
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 8 months ago by Pierre Lindenbaum112k
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: 1454 users visited in the last hour