accepting command line argument till encounters end command