sed: how to do simple transformations

Project:Programming
Component:Documentation
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Related pages:#5370: sed
Description

How to do simple transformations with sed?

In a text file, I want to transform "l'll" to "I'll".

Comments

#1

Start with:
sed 's/from/to/' file.txt

--in-place

#2

add a "g" at the end to make the changes global (i.e. not only change the first occurrence.

sed -i 's/from/to/g' file.txt

#3

The official documentation for GNU sed is not beginner friendly!

#4

Status:active» fixed

updated wiki.

#5

Status:fixed» closed
Related pages:-5370: sed

Automatically closed -- issue fixed for 2 weeks with no activity.