Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash add multui options to script

#!/bin/bash

while getopts ":a:p:" opt; do
  case $opt in
    a) arg1="$OPTARG"
    ;;
    p) arg2="$OPTARG"
    ;;
    ?) echo "Invalid option -$OPTARG" >&2
    ;;
  esac
done

printf "Argument 1 is %s
" "$arg1"
printf "Argument 2 is %s
" "$arg2"
Comment

PREVIOUS NEXT
Code Example
Shell :: Basic Authorization failed for user 
Shell :: Install heroicons npm install @headlessui 
Shell :: set swap space aws 
Shell :: bash find path of current script 
Shell :: git The requested URL returned error: 403 
Shell :: install h5py in jupyter notebook 
Shell :: http://archive.linux.duke.edu/ubuntu bionic/universe i386 libsndio6.1 i386 1.1.0-3 
Shell :: bash script colors 
Shell :: chinese linux 
Shell :: How to get packages with very_good_cli in flutter 
Shell :: linux .filename meaning 
Shell :: how to convert shell script to yaml file 
Shell :: white sur icon theme for ubuntu 22.04 
Shell :: sed bahs 
Shell :: Change cursor style in cmd ,Powershell ,terminal ,git bash 
Shell :: How to Loop through Array Elements 
Shell :: pwsh exit script 
Shell :: redwood authentication 
Shell :: Recipe to merge git 
Shell :: ubuntu fresh install deps 
Shell :: How to search for files using ? to match file extension 
Shell :: add second clock to windows powershell 
Shell :: install postgresql and phppgadmin client 
Shell :: rebuild all apps dokku 
Shell :: windows command count output lines 
Shell :: The zip extension must be loaded 
Shell :: virtmanager network autostart 
Shell :: picoCTF file-run1 
Shell :: how to check if tab was pressed in bash 
Shell :: git Ambersafety 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =