#!/bin/bash function show_help(){ echo "List configmap(s) available based on enviroment provided:" echo "lsconfigmaps " echo " >lsconfigmaps dv06" echo "lsconfigmaps " echo " >lsconfigmaps dv06 assistant-alexa" echo "" echo "Help: " echo " >lsconfigmaps -h" echo "" echo "Short for:" echo " kubectl --namespace= get configmaps" echo " kubectl --namespace= get configmaps/" } case $1 in -h) show_help ;; *) case $# in 1) kubectl --namespace=$1 get configmaps ;; 2) kubectl --namespace=$1 get configmaps/$2 ;; *) show_help esac esac