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

What are the four fundamental components of every file system on linux?

1725


What is a shell made of?

996


What are the default permissions of a file when it is created?

1065


How do I read a .sh file?

1168


shell script for reverse the string

1446


What is in a script?

1053


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

1015


What is wc in shell script?

1021


How do I open the shell in cmd?

1199


What language is bash?

956


What are the different communication commands available in the shell?

1008


What is bash shell command?

1047


Explain about "s" permission bit in a file?

1114


Why is it called a shell?

968


What is the use of .sh file?

1173