Linux Today: Linux News On Internet Time.





More on LinuxToday


How to use getopts to parse a script options

Aug 26, 2017, 14:00 (0 Talkback[s])
(Other stories by Egidio Docile)

WEBINAR: On-demand Event

Replace Oracle with the NoSQL Engagement Database: Why and how leading companies are making the switch REGISTER >

Modifying a bash script behavior via runtime options, just like we normally do with command line programs, can be very useful. The bash shell provides the getopts builtin command, a standard way to achieve this. How to use it is what we will learn in this tutorial.

Complete Story