Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

sed in 4 steps

This revision card explains sed in 4 steps. It starts from the need that preview a replace. It describes edit with backup. The how-to section notes print some lines. An example on the card is delete comments.

sed in 4 steps Preview a replace. Edit with backup. Print some lines. Delete comments.
sed in 4 steps · Download PNG
Read card text

What this card says

Why do we need it?

Preview a replace.

sed "s/8080/9090/g" app.conf

What is it?

Edit with backup.

sed -i.bak "s/8080/9090/g" app.conf

How to do it

Print some lines.

sed -n "10,20p" app.log

Example

Delete comments.

sed "/^#/d" app.conf

See all AWS revision cards