Category: Scripting

1

Bash Scripting – Using Variables

Just running individual commands from the shell script is useful, but this has its limitations. Often, you’ll want to incorporate other data in your shell commands to process information. You can do this by using variables. Variables allow you to temporarily store information within the shell...

2

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....

2

Part 1 – Mastering Sed – Introduction , Invocation and Programs

1 Introduction `sed’ is a stream editor. A stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline). While in some ways similar to an editor which permits scripted edits (such as `ed’), `sed’ works by making only...

1

Part 2 – Mastering Grep – Regular Expressions

Using Regular Expressions with Grep A “regular expression” is a pattern that describes a set of strings. Regular expressions are constructed analogously to arithmetic expressions, by using various operators to combine smaller expressions. `grep’ understands three different versions of regular expression syntax: “basic,” (BRE) “extended” (ERE)...

1

Part 2 – Mastering SED – Usage Examples

1 Centering Lines Using SED This script centers all lines of a file on a 80 columns width. To change that width, the number in `\{…\}’ must be replaced, and the number of added spaces also must be changed. Note how the buffer commands are used to separate...

1

Part 3 – Mastering Grep – Usage Examples

Here is an example command that invokes GNU `grep’: grep -i ‘hello.*world’ menu.h main.c This lists all lines in the files `menu.h’ and `main.c’ that contain the string `hello’ followed by the string `world’; this is because `.*’ matches zero or more characters within a line....

Page 4 of 5

[contact-form to='ramkumar.ramadevu@gmail.com' subject='New Learning Request Submitted'][contact-field label='Name' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][contact-field label='Learning Request' type='textarea' required='1'/][contact-field label='Are you Looking for ' type='radio' required='1' options='Paid Training,Free Training'/][/contact-form]

What is your Learning Goal for Next Six Months ? Talk to us