awk '# lower - change upper case to lower case # initialize strings BEGIN { upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" lower = "abcdefghijklmnopqrstuvwxyz" } # for each input line { # see if there is a match for all caps while (match($0, /[A-Z]+/)) # get each cap letter for (x = RSTART; x