shell script template: added more useful arg parsing while loop