jeesshnasree
Flight Engineer
Flight Engineer
  • 1,034 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,023 Views

Re: How to add lines in file

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
Reply
Loading...
jeesshnasree
Flight Engineer
Flight Engineer
  • 1,002 Views

Re: How to add lines in file

Hi @RichardRichter ,

 

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

0 Kudos
Reply
Loading...
varelov
Flight Engineer Flight Engineer
Flight Engineer
  • 949 Views

Re: How to add lines in file

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
Reply
Loading...
Join the discussion
You must log in to join this conversation.