Answers for "convert all files to lowercase using shell script"

1

convert all files to lowercase using shell script

#!/bin/sh

for x in `ls`
  do
  if [ ! -f $x ]; then
    continue
    fi
  lc=`echo $x  | tr '[A-Z]' '[a-z]'`
  if [ $lc != $x ]; then
    mv -i $x $lc
  fi
  done
Posted by: Guest on September-08-2020

Code answers related to "convert all files to lowercase using shell script"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language