Saved Bookmarks
| 1. |
How To Define Functions In Shell Scripting? |
|
Answer» A function is SIMPLY a block of of CODE with a name. When we GIVE a name to a block of code, we can then call that name in our script, and that block will be executed. Example is SHOWN below:$ disk usage () { df -h ; } A function is simply a block of of code with a name. When we give a name to a block of code, we can then call that name in our script, and that block will be executed. Example is shown below:$ disk usage () { df -h ; } |
|