i'm writing shell script and i'm at the point where i need getopts help
how can i use getopts and have multiple arguments (some of them is required and some of them is optional)? for instance.
i need to run shell with following arguments:
here i also need to run either of those, not together... but one parameter is required, and if someone just run it with --sleep that wouldn't be sufficient since --host/ip or --file-list wasn't specified..
--status [print out status]
from what I've Google'ed, all examples only shows you how to take 1 parameter and work with it, but i didn't find any where it would show you how to take more then one and in one case make something required
sounds complicated i know