Professional Documents
Culture Documents
Function
Function
function_name()
{
// body of the function
}
Example
• Following example shows the use of function −
#!/bin/sh
# Define your function here
Display ()
{
echo "Hello World"
}
# Invoke your function Display
Pass Parameter to Function
#!/bin/sh
# Define your function here
Display ()
{
echo "Hello World $1 $2"
}