I have many files named like this:
lib01.GFBAG_UHAU.fastq.sam.bam
lib02.ABABAB_ZU.fastq.sam.bam
lib03.ZGAZG_IAUDH.fastq.sam.bam
Many parts of the filenames are thus variable in length, although they are connected through the same type of punctuation (. or _).
What I want to achieve is to remove the part .fastq.sam.bam from a filename when I loop trough these files in BASH. How do I achieve this in Bash?
lib01.GFBAG_UHAU.fastq.sam.bam
lib02.ABABAB_ZU.fastq.sam.bam
lib03.ZGAZG_IAUDH.fastq.sam.bam
Many parts of the filenames are thus variable in length, although they are connected through the same type of punctuation (. or _).
What I want to achieve is to remove the part .fastq.sam.bam from a filename when I loop trough these files in BASH. How do I achieve this in Bash?
Comment