upper and lower

 Recently found my prompted blinking at a folder with a bunch of all capital letter files in it. This bash shell script made them lowercase


lower upper

#!/bin/bash
UPPER=$1
LOWER=`echo $UPPER | tr '[A-Z]' '[a-z]'`
echo 'mv ' $UPPER $LOWER
mv $UPPER $LOWER

#!/bin/bash
LOWER=$1
UPPER=`echo $LOWER | tr '[a-z]' '[A-Z]'`
echo 'mv ' $LOWER $UPPER
mv $LOWER $UPPER




This works fine on a single file, next you want to use a for loop to operate on a whole bunch of files
for f in $(ls); do lower $f; done



The opinions expressed in this post do not necessarialy reflect those of blogger or our sponsor:



Two Days in Tasmania

    Tasmania is a land of unique natural beauty. As a remote destination there is much to explore. My path followed the morning sun to the warm eastern coast, for some waves and rays. There I found Redbill bay, a reserve for flying penguins.





     Not really all that rough with a van, rather it was nice for a couples days escape. After meeting some friendly locals I headed for lime bay national park. The route took me off down the paved roads, and onto dirt tracks until I found this cove of great camp sites just before sunset.



see more photos from my Tasmania surfcamp adventure at :  https://picasaweb.google.com/112415123522641699177/Tasmania

The opinions expressed in this post do not necessarialy reflect those of blogger or our sponsor: