Use parentheses to create the string matches you need in regular expressions. Parentheses allows you to use pipes for multiple matches.
Read more »String Matches in Regular Expressions
- Login to post comments
Using Character Classes to Create Matches
Use character matches to help select data out of files. Character classes help you select based on as series of letters or text strings.
Read more »- Login to post comments
Sustitution with sed
The Linux utility sed provides a great way to substitute text strings in a file. Using the "s" option and by listing the current string and the string to use as the new text allows sed to perform this task.
Read more »- Login to post comments
Line Addressing in sed
sed can select lines in a file that can be individually modified, printed or deleted. sed is able to select and number any of lines within a file.
Read more »Category: Beginner Tags:
- Login to post comments
Using Functions in a Library
When you want to reuse functions in multiple scripts you can create a library which allows you to access those created functions.
Read more »Category: Beginner Tags:
- Login to post comments
Alter Your Environment with Functions
The user can alter the Bash shell environment by adding functions to their .bash_profile or by editing the global /etc/profile script for all users. This feature provides a great deal of flexibility for the administrator and user.
Read more »Category: Beginner Tags:
- Login to post comments
Using nl to Number Lines
The Linux utility nl is an easy tool to use to number lines in scripts or flexible enough to create headers, body and footers in your documents.
Read more »Category: Beginner Tags:
- Login to post comments
Learning How to Delete Files Safely in Linux
The rm command can be used safely to remove files and directories in Linux, especially if you create an alias that will interactively ask about deletions.
Read more »Category: Beginner Tags:
- Login to post comments
for Loop Example
Using a for loop to examine a series of IP Addresses to use in a firewall script to block Zombie networks.
Read more »Category: Beginner Tags:
- Login to post comments
Using find to Execute a Command
The find command can be used to execute a command based on the data that is located with the initial find command. This provides a powerful alternative for manipulating the data you retrieve.
Read more »Category: Beginner Tags:
- Login to post comments
Exercise #5: Managing the Structure of the awk file
The awk file can be modified to include a BEGIN section and an END section that allows you to perform tasks before and after the records are processed.
Read more »Category: Beginner Tags:
- Login to post comments
Exercise #2: Learning awk with Operators
When you use awk with operators levels, comparisons and ranges can be part of the data search.
Read more »Category: Beginner Tags:
- Login to post comments
Exercise #1: Learning awk Basics
By performing these basic commands you will begin to see the power and flexibility of the Linux utility awk. This exercise is designed to start you down the path of using awk.
Read more »Category: Beginner Tags:
- Login to post comments
Record Screen Activity with the script Command
The script command makes a transcript of the text that is printed to the terminal. You can record your interaction with the shell using this command.
Read more »Category: Beginner Tags:
- Login to post comments
Using awk Operators for Math Functions
This tutorial describes how awk can use operators to increment or decrement as well as other arithmetic functions. awk uses four arithmetic functions:
+ addition
- subtraction
* multiplication and
/ division.
Category: Beginner Tags:
- Login to post comments