View Single Post
Old 10-10-2019, 05:08 PM   #3
ungsik
Junior Member
 
Location: Korea

Join Date: Mar 2013
Posts: 1
Default

Refer to https://unix.stackexchange.com/quest...ck-of-variable

An example for changing extension from fastq.sam.bam to txt.

for file in *.fastq.sam.bam
do
mv ${file%.fastq.sam.bam} ${file%.fastq.sam.bam}.txt
done
ungsik is offline   Reply With Quote