![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Removing end of line to merge multiple lines | tink | Shell Programming and Scripting | 4 | 10-14-2008 02:28 PM |
| Merge lines into one | anypager | Shell Programming and Scripting | 7 | 05-22-2008 03:20 PM |
| merge 2 files (without repeating any lines) | bluemoon1 | Shell Programming and Scripting | 9 | 10-25-2007 10:31 PM |
| Use sed to merge multiple lines | xb88 | Shell Programming and Scripting | 3 | 08-08-2006 01:54 PM |
| Merge wrapped lines | braindrain | Shell Programming and Scripting | 1 | 07-25-2005 07:03 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
merge multi-lines into one line
Hi,
Can anyone help me for merge the following multi-line logs( the black lines) which beginning with time: into one line. For the line with "-", it needs to be deleted. Please see the red color line. ######################################### time: 20080817073334 dn: uid=ok,ou=nbt users,cn=998,dc=tcb,dc=com changetype: modify replace: NBTSignOn NBTSignOn: 20080817 172.31.4.81 998A - replace: modifiersName modifiersName: uid=ok,ou=nbt users,cn=998,dc=tcb,dc=com - replace: modifyTimestamp modifyTimestamp: 20080816233336Z - --> time: 20080817073334 dn: uid=ok,ou=nbt users,cn=998,dc=tcb,dc=com changetype: modify replace: NBTSignOn NBTSignOn: 20080817 172.31.4.81 998A replace: modifiersName modifiersName: uid=ok,ou=nbt users,cn=998,dc=tcb,dc=com replace: modifyTimestamp modifyTimestamp: 20080816233336Z time: 20080817074803 dn: uid=on,ou=nbt users,cn=009,dc=tcb,dc=com changetype: modify replace: NBTSignOn NBTSignOn: 20080817 172.16.8.82 009G - replace: modifiersName modifiersName: uid=on,ou=nbt users,cn=009,dc=tcb,dc=com - replace: modifyTimestamp modifyTimestamp: 20080816234805Z --> time: 20080817074803 dn: uid=on,ou=nbt users,cn=009,dc=tcb,dc=com changetype: modify replace: NBTSignOn NBTSignOn: 20080817 172.16.8.82 009G replace: modifiersName modifiersName: uid=on,ou=nbt users,cn=009,dc=tcb,dc=com replace: modifyTimestamp modifyTimestamp: 20080816234805Z |
![]() |
| Bookmarks |
| Tags |
| merge |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|