The Three Musketeers of Text Processing in Linux

The Three Musketeers of Text Processing in Linux

Core Concepts • grep: Global Regular Expression Print. Used for searching and filtering text. Its core function is to match patterns (regular expressions) and output the matching lines. • sed: Stream EDitor. A stream editor used for basic text transformations such as replacing, deleting, and inserting text. It processes text line by line and is … Read more

The Three Musketeers of Linux: grep

The Three Musketeers of Linux: grep

In the vast world of Linux, the command line is not only a powerful tool for system administrators but also the core of daily work for developers, operations engineers, and data processing personnel. Faced with massive log files, configuration information, and text data, how to quickly and accurately extract the required content becomes key to … Read more

Practical Linux Text Processing Tools: Essential Skills for Log Analysis

Practical Linux Text Processing Tools: Essential Skills for Log Analysis

tail, grep, and awk are three commonly used command-line tools in Linux/Unix environments. Each has its own focus, but they are often used together to process text data. 1. <span><span>tail</span></span>: View the end of a file Function: Displays the end portion of a file (default last 10 lines), commonly used for viewing logs or real-time … Read more

Four Easy Ways to Search for Files and Folders in Linux

Four Easy Ways to Search for Files and Folders in Linux

Linux is a powerful operating system, ubiquitous from servers to personal computers. Unlike the intuitive graphical interface of Windows, Linux relies more on command-line operations, and its file system is more complex. You might encounter scenarios where you need to find a configuration file but don’t know where it’s hidden; or you want to confirm … Read more

Unveiling the Secrets of Major Companies: Mastering the Linux Triad

Unveiling the Secrets of Major Companies: Mastering the Linux Triad

The Linux Triad consists of the three most important commands in the Linux system, renowned for their powerful functionalities and wide range of applications. The combination of these three tools can almost perfectly address data analysis scenarios in the Shell, hence they are collectively referred to as the Linux Triad. 1. grep grep is a … Read more

Introduction to Essential Linux Text Processing Commands: grep, sed, and awk

Introduction to Essential Linux Text Processing Commands: grep, sed, and awk

Today, I will introduce three commands that are frequently used for text processing in our Linux operating system: grep, awk, and sed, collectively known as the “Three Musketeers of Text” in the community. Each of these commands has its strengths, and when used together, they can efficiently meet various needs for text searching, filtering, and … Read more

The Three Musketeers of Linux: Text Processing Tools in the Command Line

The Three Musketeers of Linux: Text Processing Tools in the Command Line

The Three Musketeers of Linux grep -n:Print line numbers -A:After, print the N lines after the matched content -B:Before, print the N lines before the matched content -C:Center, print N lines before and after the matched content -E: Support extended regex, e.g., grep -E 'root|nginx' /etc/passwd -v:Invert the match -o:Only print the matched content -w:Exact … Read more

Linux – Regular Expressions

Linux - Regular Expressions

Regular expressions include basic and extended regular expressions. ★ Basic Regular Expressions (BRE) Executed using the grep command grep/sed/awk support basic regular expressions 01- ^ indicates lines starting with… ## cat -A can display spaces and other placeholders$ cat -A oldboy2.txtI am oldboy teacher!$I teach linux.$$I like badminton ball ,billiard ball and chinese chess!$my blog … Read more

Linux File Search, The Three Musketeers, and Regular Expressions

Linux File Search, The Three Musketeers, and Regular Expressions

Linux File Search 1. Overview of the find Command The need for file searching arises because we often forget the location of a file, and at such times, we need to use the find command to locate it. The find command can search for files based on various criteria, such as file name, file size, … Read more

Detailed Usage of the Linux gron Command

Detailed Usage of the Linux gron Command

Introduction <span><span>gron</span></span> is a unique command-line tool that converts <span><span>JSON</span></span> data into discrete, easily <span><span>grep</span></span>-processable assignment statement format. Its name comes from “<span><span>grepable on</span></span>” or “<span><span>grepable JSON</span></span>“, primarily addressing the challenge of handling complex <span><span>JSON</span></span> data in the command line. Core Value <span><span>gron</span></span> is centered around flattening <span><span>JSON</span></span> data into a format similar to <span><span>json.path.to.key … Read more