I know getopts but I have to make the parsing and error handling each time.
Does anyone know if there exist a “library” or a set of functions for Bash for parsing command arguments?
E.g. Perl have tons of these.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Maybe getoptx is something for you. Although I find getopts really nice and btw.: you should always do some error handling if you use user input 😉