Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Fundamentals of Linux

You're reading from   Fundamentals of Linux Explore the essentials of the Linux command line

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781789530957
Length 234 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Oliver Pelz Oliver Pelz
Author Profile Icon Oliver Pelz
Oliver Pelz
Oliver Pelz Oliver Pelz
Author Profile Icon Oliver Pelz
Oliver Pelz
Arrow right icon
View More author details
Toc

Working with sed

In this section, we will learn about the sed command, the powerful stream editor. We will give you a brief introduction on how sed works and we'll be showing you the substitution mode for automatically replacing text and files, which is one of the most important modes available. Next, we will learn about the sed command. Let's first examine its syntax:

sed [OPTION] 'pattern rule' FILE  

sed stands for stream editor and this command can edit files automatically without any user interaction. It processes input files on a line-by-line basis. Oftentimes, sed is used in shell scripts to transform any command's output to a desired form for further processing. Most everyday use cases for sed follow a similar pattern, which, in its most simple form, is first used with a regular expression or other pattern to define which lines to change in an...

You have been reading a chapter from
Fundamentals of Linux
Published in: Jun 2018
Publisher: Packt
ISBN-13: 9781789530957
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime