Added basic bash functions with pre-coding steps

Just thought it could save people some time to share this.