troubleshooting Question

hpux ksh: insert hard return after string

Avatar of Watnog
WatnogFlag for Belgium asked on
Unix OSScripting LanguagesShell Scripting
2 Comments1 Solution659 ViewsLast Modified:
Hi Experts,

I have this file on hpux:

 
...

Sun May 20 11:11:39 EDT 2012: 13
Sun May 20 11:16:39 EDT 2012: 10
Sun May 20 11:21:21 EDT 2012: 9
Sun May 20 11:26:21 EDT 2012: 9
Sun May 20 11:31:24 EDT 2012: 11
Sun May 20 11:36:25 EDT 2012: 13
Sun May 20 11:41:26 EDT 2012: 14
Sun May 20 11:46:27 EDT 2012: 14
Sun May 20 11:51:28 EDT 2012: 12
Sun May 20 11:56:32 EDT 2012: 12
Sun May 20 12:01:37 EDT 2012: 12
Sun May 20 12:06:38 EDT 2012: 9
Sun May 20 12:11:20 EDT 2012: 13
Sun May 20 12:16:23 EDT 2012: 14
Sun May 20 12:21:28 EDT 2012: 13
Sun May 20 12:26:31 EDT 2012: 10
Sun May 20 12:31:35 EDT 2012: 10
Sun May 20 12:36:34 EDT 2012: 1
Sun May 20 12:41:37 EDT 2012Sun May 20 12:46:20 EDT 2012: 6
Sun May 20 12:51:21 EDT 2012: 3
Sun May 20 10:56:28 EDT 2012: 9
Sun May 20 11:01:31 EDT 2012: 9
Sun May 20 11:06:37 EDT 2012: 11
Sun May 20 11:11:39 EDT 2012: 13
Sun May 20 11:16:39 EDT 2012: 10
Sun May 20 11:21:21 EDT 2012: 9
Sun May 20 11:26:21 EDT 2012: 9
Sun May 20 11:31:24 EDT 2012: 11
Sun May 20 11:36:25 EDT 2012: 13
Sun May 20 11:41:26 EDT 2012: 14
Sun May 20 11:46:27 EDT 2012: 14
Sun May 20 11:51:28 EDT 2012: 12
Sun May 20 11:56:32 EDT 2012: 12
Sun May 20 12:01:37 EDT 2012: 12
Sun May 20 12:06:38 EDT 2012: 9
Sun May 20 12:11:20 EDT 2012: 13
Sun May 20 12:16:23 EDT 2012: 14
Sun May 20 12:21:28 EDT 2012: 13
Sun May 20 12:26:31 EDT 2012: 10
Sun May 20 12:31:35 EDT 2012: 10
Sun May 20 12:36:34 EDT 2012: 1
Sun May 20 12:41:37 EDT 2012Sun May 20 12:46:20 EDT 2012: 6
Sun May 20 12:51:21 EDT 2012: 3
Sun May 20 12:56:24 EDT 2012: 3
Sun May 20 13:01:27 EDT 2012Sun May 20 13:06:29 EDT 2012Sun May 20 13:11:31 EDT 2012Sun May 20 13:16:34 EDT 2012Sun May 20 13:
21:34 EDT 2012Sun May 20 13:26:35 EDT 2012Sun May 20 13:31:36 EDT 2012Sun May 20 13:36:39 EDT 2012Sun May 20 13:41:23 EDT 2012
Sun May 20 13:46:26 EDT 2012Sun May 20 13:51:28 EDT 2012Sun May 20 13:56:31 EDT 2012Sun May 20 14:01:32 EDT 2012Sun May 20 14:
06:36 EDT 2012Sun May 20 14:11:38 EDT 2012Sun May 20 14:16:39 EDT 2012Sun May 20 14:21:22 EDT 2012Sun May 20 14:26:25 EDT 2012
Sun May 20 14:31:27 EDT 2012Sun May 20 14:36:30 EDT 2012Sun May 20 14:41:33 EDT 2012Sun May 20 14:46:34 EDT 2012Sun May 20 14:
51:37 EDT 2012Sun May 20 14:56:38 EDT 2012Sun May 20 15:01:21 EDT 2012Sun May 20 15:06:24 EDT 2012Sun May 20 15:11:25 EDT 2012
Sun May 20 15:16:28 EDT 2012Sun May 20 15:21:28 EDT 2012Sun May 20 15:26:30 EDT 2012Sun May 20 15:31:33 EDT 2012Sun May 20 15:
36:33 EDT 2012Sun May 20 15:41:35 EDT 2012Sun May 20 15:46:38 EDT 2012Sun May 20 15:51:21 EDT 2012Sun May 20 15:56:24 EDT 2012
Sun May 20 16:01:24 EDT 2012Sun May 20 16:06:27 EDT 2012Sun May 20 16:11:28 EDT 2012Sun May 20 16:16:32 EDT 2012Sun May 20 16:
21:34 EDT 2012Sun May 20 16:26:35 EDT 2012Sun May 20 16:31:37 EDT 2012Sun May 20 16:36:37 EDT 2012Sun May 20 16:41:39 EDT 2012
Sun May 20 16:46:39 EDT 2012Sun May 20 16:51:40 EDT 2012Sun May 20 16:56:22 EDT 2012Sun May 20 17:01:23 EDT 2012Sun May 20 17:
06:26 EDT 2012Sun May 20 17:11:28 EDT 2012Sun May 20 17:16:31 EDT 2012Sun May 20 17:21:36 EDT 2012Sun May 20 17:26:37 EDT 2012
Sun May 20 17:31:39 EDT 2012Sun May 20 17:36:23 EDT 2012Sun May 20 17:41:25 EDT 2012Sun May 20 17:46:25 EDT 2012Sun May 20 17:
51:26 EDT 2012Sun May 20 17:56:27 EDT 2012Sun May 20 18:01:29 EDT 2012Sun May 20 18:06:31 EDT 2012Sun May 20 18:11:34 EDT 2012
Sun May 20 18:16:35 EDT 2012Sun May 20 18:21:37 EDT 2012Sun May 20 18:26:39 EDT 2012Sun May 20 18:31:20 EDT 2012Sun May 20 18:
36:22 EDT 2012Sun May 20 18:41:25 EDT 2012Sun May 20 18:46:27 EDT 2012Sun May 20 18:51:28 EDT 2012Sun May 20 18:56:31 EDT 2012
Sun May 20 19:01:31 EDT 2012Sun May 20 19:06:33 EDT 2012Sun May 20 19:11:36 EDT 2012Sun May 20 19:16:36 EDT 2012Sun May 20 19:
21:37 EDT 2012: 8
Sun May 20 19:26:39 EDT 2012: 34
Sun May 20 19:31:20 EDT 2012: 23
Sun May 20 19:36:23 EDT 2012: 18
Sun May 20 19:31:20 EDT 2012: 23
Sun May 20 19:36:23 EDT 2012: 18
Sun May 20 19:41:23 EDT 2012: 17
Sun May 20 19:46:25 EDT 2012: 17
Sun May 20 19:51:28 EDT 2012: 18
Sun May 20 19:56:32 EDT 2012: 12
Sun May 20 20:01:32 EDT 2012: 21
Sun May 20 20:06:33 EDT 2012: 17
Sun May 20 20:11:34 EDT 2012: 15
Sun May 20 20:16:34 EDT 2012: 16
Sun May 20 20:21:35 EDT 2012: 11
Sun May 20 20:26:35 EDT 2012: 13
Sun May 20 20:31:36 EDT 2012: 1
...

Problem is with the date stamp not followed by a semicolon and a number (in fact a zero).
I need something to replace the [2012 not followed by a semicolon] by a hard return.

Can you help here?
Thanks.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros