Adding extract function from UbunutuForums post 1116012 to .bashrc