Category: Scripting


Bash scripting – Nesting loops

A loop statement can use any other type of command within the loop, including other loop commands. This is called a nested loop. Care should be taken when using nested loops, because you’re performing an iteration within an iteration, which multiplies the number of times commands...


Part 1 – Mastering GREP – Introduction and Invoking

Introduction to Grep `grep’ searches input files for lines containing a match to a given pattern list. When it finds a match in a line, it copies the line to standard output (by default), or produces whatever other sort of output you have requested with options....


Bash Scripting – Redirecting output in scripts

You can use the STDOUT and STDERR file descriptors in your scripts to produce output in multiple locations simply by redirecting the appropriate file descriptors. There are two methods for redirecting output in the script: Temporarily redirecting each line Permanently redirecting all commands in the script...


Bash Scripting – using shift command

Another tool you have in your bash shell tool belt is the shift command. The bash shell provides the shift command to help you manipulate command line parameters. The shift command literally shifts the command line parameters in their relative positions. When you use the shift...


Get every new post delivered to your Inbox

Join other followers

Page 1 of 5