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.
Shell Script to demonstrate functions
# Shell script to demonstrate functions.
echo "this is the first function"
echo "this is function 2"
echo "this function has the argument 1 with value $1"
# Calling the functions in the script
Like it on Facebook, +1 on Google, Tweet it or share this article on other bookmarking websites.