-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctions.sh
More file actions
executable file
·39 lines (27 loc) · 845 Bytes
/
Copy pathfunctions.sh
File metadata and controls
executable file
·39 lines (27 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
## Globals variables
separator="---------------------------------------------------"
## Better output visualisation.
echo "$separator"
function welcome_01 {
echo "welcome to zero to hero devops roadmap github repository"
echo "function definition using function keyword"
}
## Use function name to use it
welcome_01
echo "$separator"
welcome_02 () {
echo "welcome to zero to hero devops roadmap github repository"
echo "function definition using function name following ()"
}
## Use function name to use it
welcome_02
echo "$separator"
## Function with positional arguments
function welcome {
echo "Welcome to $1 $2 repository"
echo "function definition using arguments"
}
## function_name first_argument second_argument [[ and so on ]]
welcome "zero to hero devops roadmap" "github"
echo "$separator"