Monday, December 31, 2012

Create Simple Shell Script Function

The below code snippet shows how can call simple shell script function.

shell script name  : simple_function

#!/bin/ksh
simple_function_call()
{
 echo -e "Hello World!"
}
simple_function_call


Output :

-bash-3.2$ sh simple_function
Hello World!
-bash-3.2$

simple_function_call is the function name we can call the function simply call by function name like simple_function_call

Note : In generaly shell script function is worked bottom up aproach. dont specified any argument in the function delcaration statement.

No comments:

Post a Comment

Oracle EBS: Query to Link OM Order Source with AR Grouping Rules and Attributes

SELECT      hou.name,     rtsa.name "Order Source/Transaction Source",     rtsa.description "Description",     gr1.name ...