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

Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.

1018


What are scripts in psychology?

988


What is a shell made of?

905


What can you do with powershell?

1064


How do I run a powershell script?

1043


How do I start a shell script?

1124


What are the various stages of a linux process it passes through?

1086


What are the different commands available to check the disk usage?

920


What language is bash?

851


What are the two files of crontab command?

1141


Calculate a real number calculation directly from the terminal and not any shell script.

1150


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

957


write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.

2705


What are the disadvantages of shell scripting?

1121


I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.

968