First working version

This version is a shell script.