home.


Bash: functions and arguments

A function is easily defined in a script as somename() { echo "blar" } which you then call via somename.

You can pass parameters like somename "hi there" and with the definition somename() { echo ${1}!! }.


Tags: bash
Posted: Monday 2 January 2017, 9:46AM

Edit on Github!
comments powered by Disqus