This lesson isn't designed to teach general Bash scripting or trying to understand the Bash Command Line Interface (CLI). What we'd like to do is focus in on getting a better understanding of automating your software development. This can be any aspect of software development, such as importing data into databases, automating webpage creation, releasing software to various environments, and more.
The idea is that anything is a candidate for automation if you do it more than once in a while. Some environments require it no matter how much you do it.
Software releases are a great candidate for developing automation. A lot of times there are multiple steps if you were to do it manually. This gets tedious and is extremely slow. Another argument for automating these steps is that at any time, you should only have to type one command to release a new version of your software. This gives you the opportunity to continually release new features quickly to your users.
Some quick helpful tips before going into this lesson follow:
- Bash is a huge animal and we're only focusing on a small sliver of it.
- Bash command lines usually look different, depending on the system you use, whether it's macOs, Linux, BSD, WSL, etc.
- This guide assumes you have some Unix Command Line experience. If you don't, you probably won't be able to follow this guide.
We'll use certain conventions to show what you need to do on your own system. Basically, what you need to type and what you're looking for when typing it.
- When specifying a regular user, we'll use a dollar sign ($) then show the command to run as a regular user.
- When specifying a root user, we'll use a pound / number / sharp / hash character (#) then show the command to run as a root user.
$ This is a regular user
# This is a root user
What this means, is if you see something after a $ or #, you need to run that command in your own terminal. Either copy and paste it or type it manually.
Quickly, a root user (#) has God permissions on the system and can do anything they want. Regular users ($) have less permissions and have to ask for permission to do certain operations on the system. Normally you want to ask for permission to do things because it makes you think through what you're about to do and whether or not it will fuck up your system.
Depending on the system, you might need to prepend a sudo to the command your running to run it as root.
You can also get root on your system by typing the following
sudo -i
On other systems, you might need to run su to "su" to root.
su
You will then drop into a root shell. Of course, all the usual root cautions should be noted, such as don't fuck up.
In summary, let's try to make software development easier and faster!