Using CAT And Bash Redirection To Write To Files

In this post I will show you how to use bash redirection to write to a file using the cat command. This is a very simple trick that you can use for all sorts of things when it comes to bash scripting including setting up certain configuration files when more powerful options aren’t available or aren’t worth using. You can also use this in your bash scripts to create files from scratch if need be without having to have separate files or download them remotely.

Using Basic Loops In Bash Scripts

In this post I will be showing you how to use some of the basic loop functions available in bash scripting. These loops (especially a basic for loop) come in handy and are used pretty much daily for me. You can run these loops directly from the terminal, you do not need to actually save them as a script to execute them which makes them even more useful. I will get into using loops to iterate through arrays and other useful tricks on a later post so keep an eye out if you liked this one! =)

Using If Statements In Bash

In this post I will be showing you how to use if statements in bash. If statements are basically what they sound like, if this then that. That being said they can also be written with other conditions. Below I will show some of the examples of different if statements.