#!/bin/bash dict(){ echo $username } usage() { echo "-f buat nampilin" echo "-u username inisialisasi username" echo "-h showing help" } if [ $# == 0 ]; then echo "use -h to show usage" fi while getopts "fu:h" opt; do case $opt in f) dict ;; u) username="$OPTARG" ;; h) usage ;; \?) echo "Invalid option: -$OPTARG" >&2 exit 1 ;; :) echo "Option -$OPTARG requires an argument." >&2 exit 1 ;; esac done