HostOnNet Blog

sed

Looking for Linux Server Admin or WordPress Expert? We can help.

sed is a command line tool to replace text.

To display only

sed -e "s/FIND_TEXT/REPLACE_TEXT/g" 1.txt

To Replace text

sed -i "s/FIND_TEXT/REPLACE_TEXT/g" 1.txt

You can use regular expression for matching text.

Posted in Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.