Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash parse arguments

#!/bin/bash

SHORT=c:,d:,h
LONG=city1:,city2:,help
OPTS=$(getopt --alternative --name weather --options $SHORT --longoptions $LONG -- "$@")
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #bash #parse #arguments
ADD COMMENT
Topic
Name
8+3 =