in unix, read the file name from a .txt file from one path and rename the file in another path

I have tried the below code but its taking too long to execute.
Anyone help me on this

#!/usr/bin/env bash
echo -n "Enter Source_Path:"
read src_path
echo -n "Enter TXTFile_Name:"
read f_name
echo -n "Enter Desti_path:"
read path
cd $src_path
while read -r line; do
  mv $path/$line $path/$line._$date
echo "Files are renamed."

The source path contains the text file from where file names are picked and renamed in Desti_path

Source: unix

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.