Sed append after match line

You can append any value after match line using sed command

Here is simple file.

$ cat file
line1
line2
line3
line5

Run command to append new value from sed
$ sed -i '/search_with_match_line/a append_with' file


Share on Google Plus

About Md. Shahzad Alam

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

1 comments: