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 is a shell made of?

962


What is bash eval?

1015


What does path stand for?

1066


What is batch file programming?

1162


What is shell and terminal?

1007


What is c in shell script?

1068


How do I run a script from command prompt?

1082


‎What is a shell? · ‎Types of shell · ‎what is shell scripting?

984


What is the use of .sh file?

1122


How will you copy a file from one machine to other?

1006


What is difference between bash and shell?

1109


What is another name for a bash shell script that you might see?

1476


What is the equivalent of a file shortcut that we have a window on a linux system?

1133


Determine the output of the following command: [ -z “” ] && echo 0 || echo 1

997


How can you find out how long the system has been running?

902