Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

function command in Linux with examples

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Function is a command in linux which is used to create functions or methods. 

 

1.using function keyword : A function in linux can be declared by using keyword function before the name of the function. Different statements can be separated by a semicolon or a new line. 
SYNTAX 
 

function name { COMMANDS ; }

 

 

2.using parenthesis : A function can also be declared by using parenthesis after the name of the function. Different statements can be separated by a semicolon or a new line. 
SYNTAX 
 

name () { COMMANDS ; }

 

 

3.Parameterised function
 

$1 will displays the first argument that will be sent and $2 will display the second ans so on… 
 

4.help function : It displays help information. 
 

 

 

My Personal Notes arrow_drop_up
Last Updated : 04 Aug, 2021
Like Article
Save Article
Similar Reads
Related Tutorials