Jump to content

How to add other characters to the same file


Guest rakeshc
 Share

Recommended Posts

Guest rakeshc

HI,

I have a file(File1) which has the contents as below:

 

Oct 25 21:06

Oct 25 22:17

Oct 25 22:39

Oct 25 22:41

Oct 25 22:51

 

Now I have to write to another file(File2) everything in File1 and have to add additional data as below:

Oct 25 21:05

Oct 25 21:06

Oct 25 21:07

Oct 25 22:16

Oct 25 22:17

Oct 25 22:18

Oct 25 22:38

Oct 25 22:39

Oct 25 22:40

Oct 25 22:40

Oct 25 22:41

Oct 25 22:42

Oct 25 22:50

Oct 25 22:51

Oct 25 22:52

 

So, I am adding the previous time and also one minute before and one minute after to the new file.

 

Can someone help me with this ? I can later remove the duplicates with the uniq.

 

Please help

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...