blur bright business codes

Quick Tip: Bash CLI params

While working on a bash script, I stumbled upon what I think may be the cleanest and simplest way to add CLI params to a bash script so far:

This lets you use short (-V), long (--version), space separated (--user john), and equal separated (--user=john) arguments.

It’s not perfect, but for a quick bash script hack, I’ve found it very useful!

Other Posts Not Worth Reading

Hey, You!

Like this kind of garbage? Subscribe for more! I post like once a month or so, unless I found something interesting to write about.


Comments

Leave a Reply