Ticket #9844: renameiso.sh

File renameiso.sh, 299 bytes (added by skd5aner <skd5aner@…>, 9 years ago)

Simple script to rename ".ISO" files to a lower case ".iso" extension

Line 
1#!/bin/bash
2# renames.sh
3# basic file renamer
4
5     criteria=.ISO
6     re_match=.ISO
7     replace=.iso
8     echo $1 $2 $3
9
10     
11     for i in $( ls *$criteria* );
12     do
13         src=$i
14         tgt=$(echo $i | sed -e "s/$re_match/$replace/")
15         echo "$src renamed to $tgt"
16mv $src $tgt
17     done