learnbyexample (original) (raw)
The command name sed
is derived from stream editor. The most commonly used editing command is substitution, for which various examples are shown in this blog post.
The examples presented here have been tested with
GNU sed
. Syntax and features might differ for other implementations.
Hello!
I am pleased to announce a new version of my CLI text processing with GNU awk ebook.
Learn the GNU awk
command step-by-step from beginner to advanced levels with hundreds of examples and exercises. This book will dive deep into field processing, show examples for filtering features, multiple file processing, how to construct solutions that depend on multiple records, how to compare records and fields between two or more files, how to identify duplicates while maintaining input order and so on. Regular expressions will also be discussed in detail.
Do you find awk
one-liners cryptic? Stuff like !a[$0]++
, 1
, $1=$1
, NR==FNR
and -v RS=
? You'll find examples and brief explanations for such idioms in this post.
The examples presented here have been tested with
GNU awk
. These are likely to work with most other implementations ofawk
as well.
Hello!
I just published a new version of my Understanding Python re(gex)? ebook.
This book will help you learn Python Regular Expressions step-by-step from beginner to advanced levels with hundreds of examples and exercises. The standard library re
as well as the third-party regex
module are covered in this book.
You might already know how to use the --color
option to highlight matched portions with GNU grep
. In this post, you'll see how to use ANSI escape sequences to format matched portions with GNU sed
and GNU awk
.
Hello!
I am pleased to announce a new version of my 100 Page Python Intro ebook. This book is a short, introductory guide for the Python programming language. This book is well suited:
- As a reference material for Python beginner workshops
- If you have prior experience with another programming language
- If you want a complement resource after reading a Python basics book, watching a video course, etc
Hello!
Here are some awesome deals for programming books and courses during the 2024 festive season.
Having an interactive program that automatically loads questions and checks the solution is wonderful to have while learning a topic. This TUI app has beginner to intermediate level exercises and multiple-choice questions for Python learners.
Hello!
I am pleased to announce a new version of my Vim Reference Guide ebook. This is intended as a concise learning resource for beginner to intermediate level Vim users. It has more in common with cheatsheets than a typical text book. Topics like Regular Expressions and Macros have more detailed explanations and examples due to their complexity. I hope this guide would make it much easier for you to discover Vim features and learning resources than my own blundering experience.
Hello!
I am pleased to announce a new version of my Linux Command Line Computing ebook. This is the longest book I've published so far (204 pages) — it took me more than 7 months to complete the first version and another month for a minor revision.
This ebook aims to teach Linux command line tools and Shell Scripting for beginner to intermediate level users. The main focus is towards managing your files and performing text processing tasks. Plenty of examples are provided to make it easier to understand a particular tool and its various features. Exercises at the end of chapters will help you practice what you've learned and solutions are provided for reference. I hope this ebook would make it much easier for you to discover CLI tools, features and learning resources than my own blundering experience.