Rename files with loop variable name

Rename files with loop variable name

I am trying to download a bunch of files and rename them as I go. the download portion works correctly, but i can't get it to rename the files. This is the script I'm using:

I am trying to download a bunch of files and rename them as I go. the download portion works correctly, but i can't get it to rename the files. This is the script I'm using:

COUNTER=0
for (( i = 696; i <= 773; i++ ))
  do
  fastq-dump --split-3 --accession SRR546$i
mv SRR546"$i"_1 ./"$COUNTER"mVD_SRR546$i_1
mv SRR546"$i"_2 ./"$COUNTER"mVD_SRR546$i_2
gzip *.fastq

COUNTER=$[COUNTER + 1] done

This will correctly download the file SRR546696, SRR546697 etc. but does nothing to rename them.

I also tried using:

rename 's/SRR/"$COUNTER"mVD_SRR/' *.fastq

but this also did nothing.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Linux Tutorial for Beginners | What is Linux | Intellipaat

🔥Intellipaat Linux Course: https://intellipaat.com/linux-training/ In this linux tutorial for beginners video you will learn what is linux, how to install li...

Linux Audio Survival kit. - Linux Audio Survival Kit

A brief guide to have success setting up the audio in Linux.

Kali Linux 2020.1 | The Best Linux Distro For Hacking

Advanced penetration testing and cybersecurity distro, Kali Linux has released this year's first version. Kali 2020.1 is out and in this video, we'll be having a detailed look at this exceptional distro that comes with state-of-the-art hacking and cyber forensics tools.