How to add value beginning and after line using vim command in linux

^ = for beginning line
$ = for after line

Add value in beginning of line using vim editor
:%s/^/value_with/g


Add value after line using vim editor
:%s/$/value_with/g
Share on Google Plus

About Penguin Technology

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

2 comments:

  1. Hello there! Thiis blog post couldn?t be written any better!
    Looking through this pos reminds me of my previous roommate!

    He always kept talkinhg about this. I most certainly will send
    this polst to him. Fairy certainn he'll have a very good read.I appreciate you for sharing!

    ReplyDelete
  2. Get enroll yourself in linux training institute in delhi and learn Linux in a better way.

    ReplyDelete