Bash Shell Scripting

If you are a system admin, and you wanna automate stuff you would do manually, then you can learn shell scripting, I recently created a full-blown Control Panel using only shell scripting, it is a menu-driven program that can

  • Install and Configure Multiple ClassicPress or WordPress Sites
  • Restore an Existing ClassicPress or Wordpress Website
  • Secure Sites Using Free Let’s Encrypt Certificate
  • You Can Create More Than one SFTP Users (This Way, You Can Access Through SFTP Client, e,g Filezilla, Winscp, etc)
  • Manage Your Own Custom DNS (You can also Add New DNS Zone, Edit Zone, and Even Delete DNS Zone)
  • Install PHPMyAdmin (You can also secure it with Let’s Encrypt)
  • Automate The Backup of the Complete Sites On The Server (De-duplication)
  • Many more

If you want to learn how to do something like that, then welcome to this page, you’ll learn a lot about bash scripting. Here is a link to the controlpanel

Lastly, I created this page to documents all I have learned on Bash Scripting, instead of reading the manual every time I need to use a specific function or I wanna learn a certain syntax, I’ll hop in here to find the details, and the bad thing about me is that I can only understand my very own explanation 🙂

  • sed (Stream Editor) In Bash Scripting

    Another powerful filter in GNU/Linux is sed (stream editor), which is a program for performing basic editing tasks on the output of another program or on a file. sed or stream editor can be used to perform basic text modification on an input stream (a file or input from a pipeline). sed’ works by making only ...

    Read Full Post
  • grep (Regular Expression) In Bash Scripting

    We recently discussed filters in bash scripting, in this guide we would look more into the practical usage of using a filter program, and an example of such a program is grep. grep, in its simplest form, is a filter program that displays lines of text from its input that contains a certain pattern. It reads an ...

    Read Full Post
  • Functions in Bash

    Functions are modular building blocks for creating powerful and modular scripts, using function makes it easy to isolate a code since it would be in a single building block, which would be isolated from the rest of the script. To put it simply, functions are a block of code or script within a script, here are ...

    Read Full Post
  • Returning Values From Functions in (Bash)

    In the guide function in bash, we dive deep in bash functions and we also pass some information into the functions to carry out a certain operation. In this guide, I’ll show you how to get information back out of a function. A function can return information to the calling environment in two different ways, the ...

    Read Full Post
  • Using Case Statements in Bash

    Using Case Statements in Bash

    We previously looked at looping in bash, and creating conditional statements using if and else but there are cases where using case statements makes the logic simpler, and clearer. This is the basic layout of a case statement: case expression in case1) statement1 statement2 ;; case2) statement1 statement2 ;; *) statement1 ;; esac We can use the case statement to ...

    Read Full Post