Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash function arguments

function_name(){
   command_block_here
}
## OR ##
function function_name_here(){
   command_line_block
}
## passing parameters to a Bash function ##
my_function_name(){
  arg1=$1
  arg2=$2
  command on $arg1
}
Source by bash.cyberciti.biz #
 
PREVIOUS NEXT
Tagged: #bash #function #arguments
ADD COMMENT
Topic
Name
9+1 =