#!/bin/bash
#Author: Surendra Anne
for j in *
do
COUNT=$(ls -1 | wc -l)
if [ $j == $(basename $0) ]
then
echo “can not move the script file which is running this”
else
org_file=$j
new_file=$(echo $j | tr [A-Z] [a-z])
echo “Moving $org_file –> $new_file”
mv $org_file $new_file
fi
done
Comment if there is any issue with this script.
Latest posts by Surendra Anne (see all)
- Docker: How to copy files to/from docker container - June 30, 2020
- Anisble: ERROR! unexpected parameter type in action:
Fix - June 29, 2020 - FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018