|
|
|
|
|
by andsens
1279 days ago
|
|
shameless plug
If you want to avoid having to write your own args parser everytime or think getopt is a pain, you should check out my little project: https://github.com/andsens/docopt.sh No dependencies, the code is directly inlined into your script, and you write the args parser by writing the help-text. |
|
#!/bin/sh
hey=${hey:='default one'}
do_this=${do_this:='default two'}
not_that=${not_that:='because getopts is a nightmare'}
echo "${hey} ${do_this} ${not_that}"