|
I have not test it yet, because im still dowloading opensuse
could this work?
while read line
do
words = wc –w $line // counting the words of current line
If [ $(($words % 2)) –eq 0] Then // see if number of words is even
echo $File1 | tr '[a-z]' '[A-Z]' < $File2 // if even, change all to uppercase and copy to another file
Else
echo $File1 | tr '[A-Z]' '[a-z]' < $File2 // else; odd, change all to lowercase
Fi
Done < File1
|