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 ­čÖé

  • Create Multiple Files at Once Using Brace Expansion in BASH

    Create Multiple Files at Once Using Brace Expansion in BASH

    Chances are you’ve come across expansions in BASH, whenever you are going back to the user home directory, we use the cd command alongside a tilde character (~), e.g: cd ~ This would take you back to your home directory, and that is because the tilde character represents the value of the user’s home variable, this is ...

    Read Full Post
  • Using read in a Bash Script

    Using read in a Bash Script

    We previously looked at using echo with options in a shell, in this guide we would combine it with read command to prompt for user input. Create and open up a new text file:┬ánano $HOME/bin/ Add the following: #!/bin/bash echo -n "Hello There, may I ask your name: " read echo "Hello $REPLY" exit 0 Let’s understand the command line by line: #!/bin/bash┬á – ...

    Read Full Post
  • Adding Comment To a Script

    Adding Comment To a Script

    In shell scripting, a comment is a readable explanation in a script that is ignored by the interpreter, you can either add a comment about what the script does or you can write a comment about what a specific function/section does in the script. Either way, a comment makes code easier for humans to understand the ...

    Read Full Post
  • Using echo with Options in a Shell (With Examples)

    Using echo with Options in a Shell (With Examples)

    The echo command is one of the most used shell built-in command, and as you have probably guessed, it is used to print a line of text to standard output (the screen). It sends a copy of an input signal (your keyboard) or string for display. In this guide, we would look at echo and its ...

    Read Full Post
  • Properly Naming a Bash Scripts

    Properly Naming a Bash Scripts

    Last week, I wrote a basic intro on bash shell scripting┬áin this guide, we would take a look at how to name a script properly. Let’s get this straight, we mostly do name things abruptly in the real world, but you might want to be careful in a shell world as things aren’t that black and ...

    Read Full Post