Basic Shell Scripting: Chapter-VII

Functions in Shell Script:

Function is a subscript inside a shell script. We can separate a complex script to multiple task by adding function to it. Just we need to call them where it required. In this article I will show you how to use functions in a shell script.

Syntax for Shell function:

Example:

The above example is a simple example explaining how to write and use a function.

Previous Chapter

Next Chapter

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

Leave a Reply