Google interview question

Write a bash shell expansion routine