Jump to content
funtoo forums
  • 0
eusanpe

Insert Data Into Text File

Question

Hello all,

I am hoping someone can help me with something I am trying to do.

I have a lot of files that have data as such...

Description:
This is a description test
This is a description test2
;;

Summary:
This is a test
This is a second test
This is a third test
;;

Keywords: data, data1
;;


Or it could be:

Description: This is a description test
This is a description test2
;;

Summary: This is a test
This is a second test
This is a third test
;;

Keywords: data, data1
;;

What I am wanting to do is insert the following text after the "Summary:" and all the text and before the ";;" terminator to all the files.

Date		Modified by
----------------------------------
12/21/2018	Tony P.

Any help is deeply appreciated.

Thanks,

Tony

 

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

To make it easier to understand what you are trying to achieve could you give a short example of a file before and after the change. So far I only understand that you want to modify a lot of files in the same way but it is not clear to me how the resulting file would look like. An example would help to clarify that.

Share this post


Link to post
Share on other sites
  • 0

jhan,

Thank you for the reply. Here is what I am looking to achieve.

Tony

Description:
This is a description test
This is a description test2
;;

Summary:
This is a test
This is a second test
This is a third test

Date		Modified by
----------------------------------
12/21/2018	Tony P.
;;

Keywords: data, data1
;;


Or it could be:

Description: This is a description test
This is a description test2
;;

Summary: This is a test
This is a second test
This is a third test

Date		Modified by
----------------------------------
12/21/2018	Tony P.
;;

Keywords: data, data1
;;

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...