Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 26542

How to join the string if not begin with date and add delimeter between the text

$
0
0

Hi Sir/Madam,

 

I have a text file contains below data; a.txt.

13 Aug 13:04:13.183 6160921:X14c0-CN39524 C:\AV\MR\OH12.1.SP3\ma.exe Exiting : Database error 38
  [AV MR MRDrafting Mk12.1.SP3.1[5035]  (WINDOWS-NT 6.1)  (4  Feb 2013 : 19:03)]
13 Aug 15:25:45.035 6160921:X12d8-CN39524 C:\AV\MR\OH12.1.SP3\mon.exe Entering PM on CN39524, running 5.1
13 Aug 15:25:47.378 6160921:X12d8-CN39524 C:\AV\MR\OH12.1.SP3\mon.exe Exiting : A fatal error has been detected.
The program must exit.
  [AV MR Monitor Mk12.1.SP3.1[5035]  (WINDOWS-NT 6.1)  (4  Feb 2013 : 19:03)]

 My requirement to generate another text file with a_new.txt, the requirement as below:-

1. How can i move the next line value if not start with int to join the previous line value?

2. How can i add delimeter "|" between date, time, end of time, begin C:/, end of .exe[plus 1 space]?

 

The outtput expected is:

13 Aug | 13:04:13.183 | 6160921:X14c0-CN39524 | C:\AV\MR\OH12.1.SP3\ma.exe | Exiting : Database error 38 [AV MR MRDrafting Mk12.1.SP3.1[5035]  (WINDOWS-NT 6.1)  (4  Feb 2013 : 19:03)]
13 Aug | 15:25:45.035 | 6160921:X12d8-CN39524 | C:\AV\MR\OH12.1.SP3\mon.exe | Entering PM on CN39524, running 5.1
13 Aug | 15:25:47.378 | 6160921:X12d8-CN39524 | C:\AV\MR\OH12.1.SP3\mon.exe | Exiting : A fatal error has been detected. The program must exit. [AV MR Monitor Mk12.1.SP3.1[5035]  (WINDOWS-NT 6.1)  (4  Feb 2013 : 19:03)]

 Please advise.

 

Thank you.

 

Regards,

Micheale

 

 


Viewing all articles
Browse latest Browse all 26542

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>