Remove extension in a bash script

Imagine a bunch of files with extension fastq.dsrc, the following script will decompress the files by looping over the N files. One issue was to remove the extension in the script. See below the usage of //

for filename in `ls *.fastq.dsrc`
do
dsrc d $filename ${filename/.dsrc/}
done
Please follow and like us:
This entry was posted in Linux and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published.