bash function
function hello {
echo Hello
}
hello
function e {
echo $1 # $1 is the first argument
}
e Hello
bash function
function hello {
echo Hello
}
hello
function e {
echo $1 # $1 is the first argument
}
e Hello
bash function
#!/bin/bash
#Call a function without arguments
function quit {
exit
}
#Call a function with arguments
function e {
echo $1 #$1 will be set to the first argument given
}
function in bash
#FIRST METHOD
Hello () {
echo 'Hello Wordl'
}
Hello
#SECOND METHOD
function Hello {
echo 'Hello Wordl'
}
Hello
how to make a function in bash
function_name () {
<commands>
}
how to make a function in bash
print_something () {
echo Hello I am a function
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us