Use getopt for option parsing in command put