Writing a Shell Script From Scratch