diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..929f0cc --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +all: run + +run: + ./hello.sh \ No newline at end of file diff --git a/README.md b/README.md index d8bded2..933455a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # hello-world -its a program that greets worlds + +This is a program that greets worlds. + +## building and running + +Just write: + +``` shell +$ make +``` + +Or even: + +```sh +$ ./hello.sh mars +hello, mars +$ ./hello.sh terra +hello, terra +``` + diff --git a/hello.sh b/hello.sh new file mode 100755 index 0000000..35d3691 --- /dev/null +++ b/hello.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +hello_world() { + local world=${1:-world} + echo "hello, $world" +} + +hello_world $1 \ No newline at end of file