Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

getopts in 4 steps

This revision card explains getopts in 4 steps. It starts from the need that list flags; colon = needs value. It describes loop with while. The how-to section notes case on the letter. An example on the card is value is in OPTARG.

getopts in 4 steps List flags; colon = needs value. Loop with while. case on the letter. Value is in OPTARG.
getopts in 4 steps · Download PNG
Read card text

What this card says

Why do we need it?

List flags; colon = needs value.

What is it?

Loop with while.

while getopts 'vf:' o; do

How to do it

case on the letter.

Example

Value is in OPTARG.

See all AWS revision cards