You are writing a script that requires parsing command-line options with both short and long formats. Which command would you likely use?
- getopts
- getopt
- parseargs
- getoptlong
You would likely use the getopt command to parse command-line options with both short and long formats. getopt is a versatile command for handling command-line arguments and options in shell scripts, allowing you to specify both short and long options.
Loading...
Related Quiz
- A colleague informs you that they're unable to access a service on a remote server. You suspect it might be a firewall issue. How would you list the current firewall rules to diagnose the issue?
- The ___________ distribution is known for its advanced package management system called "pacman."
- Which Samba tool is used for checking the configuration file for errors?
- Which command can be used to list currently loaded kernel modules?
- You've been tasked to lockdown a specific application on an Ubuntu server. You decide to use a tool that restricts programs to a limited set of resources. Which tool would you primarily utilize?