Shell changes the file name to lowercase

Shell changes the file name to lowercase

for f in *
do
	fn=`basename $f` 
	nc=`echo $fn | tr A-Z a-z`
	if [ "$fn" != "$nc" ]; then
		mv $fn $nc
	fi
done

Comments

Popular posts from this blog

Python Receiving and parse JSON Data via UDP protocol

ubus lua client method and event registration code demo/example