Hi all. I need a little bit of help. I have a list of files in a folder, they look like this:
H3K4me1/Cell-Line=S2-DRSC#Developmental-Stage=Late-Embryonic-stage#Tissue=Embryo-derived-cell-line/ChIP-chip/Rep-1//Dmel_r5.32/modENCODE_304.gff3 H3K4me2/Cell-Line=S2-DRSC#Developmental-Stage=Late-Embryonic-stage#Tissue=Embryo-derived-cell-line/ChIP-chip/Rep-1//Dmel_r5.32/modENCODE_965.gff3 H3K4me3/Cell-Line=S2-DRSC#Developmental-Stage=Late-Embryonic-stage#Tissue=Embryo-derived-cell-line/ChIP-chip/Rep-1//Dmel_r5.32/modENCODE_3761.gff3 H3K9ac/Cell-Line=S2-DRSC#Developmental-Stage=Late-Embryonic-stage#Tissue=Embryo-derived-cell-line/ChIP-chip/Rep-1//Dmel_r5.32/modENCODE_3765.gff3
I would like to change their name with sed command, so the final name would be like this:
H3K4me1_modENCODE_304.gff3 H3K4me2_modENCODE_965.gff3 H3K4me3_modENCODE_3761.gff3 H3K9ac_modENCODE_3765.gff3
I know i can play with
sed s and the
/ but I don't manage to get it to work. I would extremely appreciate if you explain a bit the code you give as an answer.
Thank you in advance! Best wishes,