Rellay giving you the focus on the information that you need. Adding color to your shell is going to make your scripts more usable and friendly. You can also pimp or color your BASH prompt,…
The output of lastlog is useful and shows you all the users and the date and time of their last login. Firstly though, we need to filter out the system accounts who never login. This is easy…
Now we know how to format the output in color, lets see what we may use this for. Searching though CSV files and highlighting names or products is one option and we will look at a script…
Having driven ourselves loopy for a few lessons now we have to handle interruptions. Making a script robust may include ensuring that certain activities always happen before the script closes; or perhaps, ensuring that only…
The last looping structure we look at is the FOR loop. This is often used to enumerate through a list of items such as in the following code: for U in(bob joe fred) do useradd…
Looping in any scripting environment will be useful and fun, helping us with those repetitive tasks that we hate. There are many forms of loops and in this tutorial, we take our first look at…