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 🙂

  • Sourcing With Bash

    Sourcing With Bash

    Generally, to run a bash program or script you need to add a permission bit, which makes the program or script executable and you then run it whenever you like, the thing is when execution starts, a new process or a new sub-shell is opened in the background which runs each line of the scripts. Sourcing ...

    Read Full Post
  • Suppressing Sensitive Entered Text/String In Bash

    Suppressing Sensitive Entered Text/String In Bash

    So far in our examples or scripts, we have written in the previous guides, we have no way of controlling what is visible to user, which is fine if we have no sensitive data such as passwords. As soon as you start prompting for sensitive data, it is recommended you suppress or hide the text, and ...

    Read Full Post
  • Limiting The Number of Entered Characters In read prompt

    Limiting The Number of Entered Characters In read prompt

    We previously looked at the way we could utilize the read prompts in bash, here is the script we wrote in out last guide: What if we do something as follows: Now, when the script displays the name, it will pause until you press any key, this is possible by using the -n option followed by an ...

    Read Full Post
  • Working With Variables In Bash

    Working With Variables In Bash

    A variable is a value that can change depending on conditions or data passed to the program. To work with the variable in bash, here are what you need to know: A variable name cannot start with a number, and cannot contain spaces. It can be alphanumeric It can start with an underscore To declare a variable, type the ...

    Read Full Post
  • Pipes and Redirection in Bash

    Pipes and Redirection in Bash

    Piping is the process where the result of one command is sent or pipe (redirect) into another command. A good example of this is piping the output of ls command into wc (count) for counting the number of files. On the other hand, redirection captures output from a file, command, script, etc, and sending it as input ...

    Read Full Post