![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Joining lines in reverse. append line 1 to line 2. | dwalley | Shell Programming and Scripting | 7 | 08-04-2008 08:11 AM |
| How to append some strings line by line? | xinoo | Shell Programming and Scripting | 4 | 06-24-2008 03:04 AM |
| return the previous line | user_prady | Shell Programming and Scripting | 12 | 12-18-2007 07:37 AM |
| how to go previous line in vim | useless79 | UNIX for Advanced & Expert Users | 2 | 09-16-2007 09:10 AM |
| append a line to the last line in a file | subhrap.das | UNIX Desktop for Dummies Questions & Answers | 5 | 04-25-2007 10:17 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Append line that does not contain pipe to it previous line
Hi All,
I have a file which contains data as below When we see no pipe character in the line. append those lines to the previous line with pipe character till we get the next line with pipe character with ~(concat with ~) Input file looks like: 1080530944|001|john.l.bonner|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:49:735|2007/06/28-16:25:48:662| 1080530944|001|larry.d.groves|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:49:931|2007/06/21-20:13:41:581| 1080530944|001|michael.g.krumheuer|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:50:099|2007/06/25-14:08:22:330| 1080530944|001|paul.j.frederick|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:50:234|2007/06/22-13:14:19:439| 1080530944|001|rich.jester|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:50:355|2007/06/21-14:25:43:604| 1080530944|001|robert.g.campbell|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:50:470|2007/08/30-15:31:49:127| 1080530944|001|douglas.h.markwood|Reassigned|Monitor & Control Change Notice in the Holding Area|2007/06/20-18:42:01:259|2007/06/20-18:45:42:324|s b295 Please monitor this change and update the ITA with any/all completion dates. When you have completed the changes and it has been implemented, Complete this task on your show list and "reassign" the next task back to me. E-mail me with the Actual Effectively and Completion dates. Thanks Doug M. 1080530944|001|robert.g.campbell|Complete (See Comments)|Monitor & Control Change Notice in the Holding Area|2007/06/20-18:45:42:536|2007/08/30-15:38:28:067|ok Output File should be: 1080530944|001|john.l.bonner|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:49:735|2007/06/28-16:25:48:662| 1080530944|001|larry.d.groves|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:49:931|2007/06/21-20:13:41:581| 1080530944|001|michael.g.krumheuer|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:50:099|2007/06/25-14:08:22:330| 1080530944|001|paul.j.frederick|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:50:234|2007/06/22-13:14:19:439| 1080530944|001|rich.jester|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:50:355|2007/06/21-14:25:43:604| 1080530944|001|robert.g.campbell|Acknowledge|CN Approved-Implement Change to Meet Target Effectivity Date|2007/06/20-18:41:50:470|2007/08/30-15:31:49:127| 1080530944|001|douglas.h.markwood|Reassigned|Monitor & Control Change Notice in the Holding Area|2007/06/20-18:42:01:259|2007/06/20-18:45:42:324|s b295 Please monitor this change and update the ITA with any/all completion dates.~When you have completed the changes and it has been implemented,~Complete this task on your show list and "reassign" the next task back to me.~E-mail me with the Actual Effectively and Completion dates. Thanks Doug M. 1080530944|001|robert.g.campbell|Complete (See Comments)|Monitor & Control Change Notice in the Holding Area|2007/06/20-18:45:42:536|2007/08/30-15:38:28:067|ok |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|