Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
                }  
                

           
Source by tldp.org #
 
PREVIOUS NEXT
Tagged: #bash #function
ADD COMMENT
Topic
Name
6+9 =