UT Dallas interview question

to describe and implement a shell script