Linux - Shell script to rename multiple files, Rename files using shell script

Shell script to rename multiple files

shell script to rename multiple files

Renaming multiple files in a folder is easy using linux shell script.

Save this file in ".sh" extension to tell the system that this a shell script. Place this file inside the folder where you want to rename multiples files.

For example, here we have used the script to rename all .gif files to .jpg files.
  #!/bin/bash
  for x in *.gif;
  do n=${x/.gif/.jpg};
  echo $n;
  mv $x $n;
  done

The above script will convert all the gif image to jpg image.

The topic on Linux - Shell script to rename multiple files is posted by - Math

Hope you have enjoyed, Linux - Shell script to rename multiple filesThanks for your time

Tech Bluff