August 1999
Intermediate to advanced
1000 pages
83h 9m
English
function identifier {list;} identifier() {list;}
function defines a function that is referenced by identifier . The body of the function is the list of commands between the curly braces ({}).
Alternatively, you can define a function by omitting the function keyword and appending the identifier with a set of enclosed parentheses.
The following example creates a function called status() that returns the name of your current working directory and then lists it.
$ status() { cd $*; pwd;ls; } $ $ functions function status { cd $*; pwd;ls; } $ $ status /home /home TT_DB bill lost+found $
The following example creates a function called ...
Read now
Unlock full access