Q:

function in bash

function hello {
	echo Hello
}
hello
function e {
	echo $1  # $1 is the first argument
}
e Hello
2
                #!/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
                }  
                

           
4
#FIRST METHOD
Hello () {  
  echo 'Hello Wordl'  
}  
Hello 

#SECOND METHOD
function Hello {
 echo 'Hello Wordl'
}
Hello
0

New to Communities?

Join the community