Today I will be showing you how to use the read command as-well as some read command examples.
In this post I will be showing you how to use expect in your scripts as a command instead of as a script itself. This can be useful for automatically responding when running other commands and more.
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.
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! =)
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), automatically answer prompts, etc.
Below is a quick and simple case statement that functions as a help dialog whenever the script is run with -h, –help, or -help.
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.
In this easy guide I will show you how to use the grep command with multiple grep examples. If I miss anything useful or if you would like to see something added then please feel free to comment below.