Sample Header Ad - 728x90

What does colon (:) mean for getopts?

1 vote
1 answer
1673 views
I am trying to parse options for my script with getopts and I decided that it would be best to read up on it in the POSIX standard, as it's usually extremely helpful. The *DESCRIPTION* section is fairly ambiguous in regard to the use of colon (:) in *optstring*, so I looked up how people use : with getopts on the internet and now I'm confused. What does colon do in commands like getopts abc:d name and how am I supposed to know just by reading the standard?
Asked by Nicolas Dumitru (121 rep)
Aug 22, 2023, 04:06 PM
Last activity: Aug 22, 2023, 04:44 PM