Open Means Open Means
We can modularize the code in Shell Script as well as with the other languages. Separate the common functionality into separate functions so that they can be used anywhere in the script. Also this makes the big programs to easily understand.

e.g.
# Shell script to demonstrate functions.
function1(){
echo "this is the first function"
}

function2(){
echo "this is function 2"
echo "this function has the argument 1 with value $1"
}

# Calling the functions in the script
function1
function2(54)

No comments

Login to post a comment

Show
  • Create an account
  • Forgot your username?
  • Forgot your password?

Related Articles

  • Using command line argument in Shell Script
  • Shell Script to Check File Permissions
  • Significance of Net Asset Value (NAV)
  • Net Asset Value (NAV)
  • Working With JavaServer Faces Managed Beans
  • Java Puzzle - Problem of Two Developers Part 2
  • Adsense High Paying Keywords
  • ITC - Tons of steady growth
  • Demonstration of Fibonacci Series Using Recurssion
  • Canara Bank Specialist Officers - Computer Programmer Written Exam Paper
  • About Us
  • Faqs
  • Contact Us
  • Disclaimer
  • Terms & Conditions