#!/bin/ksh #Translate English to lowercase Pig Latin: owercaselay igpay atinlay #Sample use: piglatin < $S45/karenina | more tr '[A-Z]' '[a-z]' | sed ' s/^/ / #If the word starts with a vowel, temporarily prefix a "w". s/\([^a-z]\)\([aeiou]\)/\1w\2/g #Chop off first letter of the word, move it to end, and add "ay". s/\([a-z]\)\([a-z]*\)/\2\1ay/g s/^ // ' exit 0