jeesshnasree
Flight Engineer
Flight Engineer
  • 1,484 Views

How to add lines in file

Hi team,

how to add line in file .

 

Insert lines should not open ,then add the lines in file .Without modify old lines,then below tasks need to do as per requirements,

1. First need to the line first line,

2. First need to add the line end ,

3. Find the word , then add desired line .

 

finally need to verify the lines add properly or not and without junk characters.

 

 

If anyone knows could you please share your valuable information.

 

 

Tags (2)
0 Kudos
3 Replies
  • 1,473 Views

Hi,

use "sed" for all this requests, for further information use man sed or have a look into
http://www.yourownlinux.com/2015/04/sed-command-in-linux-append-and-insert-lines-to-file.html  as example.

regards

Richard

Tags (3)
0 Kudos
jeesshnasree
Flight Engineer
Flight Engineer
  • 1,452 Views

Hi @RichardRichter ,

 

shared link is not working, could you please check from your end .

0 Kudos
varelov
Flight Engineer Flight Engineer
Flight Engineer
  • 1,399 Views

This looks and feels like writing somebody else's homework, which may be interesting to some degree at times. It is also amusing how unclear the question is, terrible formulation.

0 Kudos
Join the discussion
You must log in to join this conversation.