Tag: bash scripting

Display Password Change Requirements To Users

In this guide I will show you how to display the password requirements you have setup for your system to users when they are changing their password. The reason this is necessary is because usually they will not have any idea what the password requirements actually are. What we are going to do is add an extra function and alias …

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 …

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 …

Writing A Basic Expect Script For Automating Tasks

Today I will be showing you how to use a basic expect script inside of your bash scripts for automation. Expect works just like the name sounds, expect to see a prompt or other piece of text and then send the response. With this you can do things such as automatically entering password for SSH (not recommended for daily use), …

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.