How to declare functions in unix shell script?

Answer Posted / prakash

function Dissplay () {

echo "This is how we define function"

}


Display # Invoking Function

## Function should be defined before we invoke it

Is This Answer Correct ?    67 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to redirect both standard output and standard error to the same location?

894


How to print all array elements and their respective indexes?

705


What is $1 in shell scripting?

793


What does $1 mean in bash?

813


What is the fastest scripting language?

732


Explain about stdin, stdout and stderr?

818


shell script for reverse the string

1073


What is the difference between scripting and coding?

732


I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?

962


Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created that will monitor the WA service on the Primary and when the service stops/fails a Sev 2 TT is generated for a particular team ?

1911


wats the deinitions for shell utility and filter?

2067


how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?

3828


What is a batch file used for?

774


What are the zombie processes?

729


Where is bash history?

676