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 🙂

  • Test Shell Builtin Command

    Test Shell Builtin Command

    The test command can be a shell builtin or file executable (if you specify the full path to the file) that is used for file comparison, it returns a status of 0 (true) or 1 (false) depending on the evaluation of the conditional expression EXPR. It can be used to check file types, string operator, and numeric comparison ...

    Read Full Post
  • Check If Variable Is Not Empty [isset] (Bash)

    Check If Variable Is Not Empty [isset] (Bash)

    In the getting started with bash guide, we took a sneak peek in customizing script with argument, the issue with the example is that we aren’t checking if the variable is set or not before returning the output, which we are going to amend in this guide. We would ensure that a value has been supplied ...

    Read Full Post
  • Simple Conditional Execution With (Command Lists)

    Simple Conditional Execution With (Command Lists)

    We’ve previously explored a little of a command list in our Getting Started with Bash Guide, where we check if a directory already existed in our user home directory, if it already exists, output “Something“, and if does not already exist, create a folder, here is the code: In this guide, we would get into the ...

    Read Full Post
  • read prompts in bash script

    read prompts in bash script

    We’ve previously taken a quick look at the builtin read command, where we use the built-in read to populate the $REPLY variable, which holds the value of read when a variable is not supplied to read, it would store whatever you type in the stdin, and we then echo it. In this guide, we would use the ...

    Read Full Post
  • Local Variable, Typset and The Declare Command In Bash

    Local Variable, Typset and The Declare Command In Bash

    Local variables are private inside of a function and the most important thing about a local variable is that when it is changed in a function, it doesn’t affect the variable outside of a function. If you only need a variable in a specific function then it is a good idea to declare them a local, ...

    Read Full Post