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

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 5 months ago by arsilan32450

, 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 5 months ago • written 5 months ago by Pierre Lindenbaum108k

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 5 months ago by arsilan32450
1

Okay! i got it..thanks

ADD REPLYlink written 5 months ago by arsilan32450
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 5 months ago by Pierre Lindenbaum108k
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: 1002 users visited in the last hour