Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to declare functions in unix shell script?

Answer Posted / sujay kumar

First method:

function function_name
{
}

Second Method:

function_name()
{
}

For both methods, the invocation of function would be in
the same format only.

Invocation:

function_name

Is This Answer Correct ?    62 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to set an array in linux?

1222


What is a shell script in windows?

1089


How to debug the problems encountered in the shell script/program?

1146


c program to display the information of given file similar to givan by the unix or linux command ls -l

2220


What makes c shell a more preferable option than the bourne shell?

974


Why should we use shell scripts?

1052


What is the first line of a shell script called?

1089


What is eval in shell script?

1251


What are the different types of commonly used shells on a typical linux system?

1091


Why is the use of shell script?

977


wats the deinitions for shell utility and filter?

2317


What is bash shell command?

1009


Given a file find the count of lines containing the word "abc".

1556


Is powershell a language?

1048


What is bash coding?

925