![]() |
|
|
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 |
| Recover data from 2 files then combine | saint65 | UNIX for Dummies Questions & Answers | 1 | 04-19-2008 03:45 PM |
| how to delete text from line starting pattern1 up to line before pattern2? | repudi8or | Shell Programming and Scripting | 5 | 04-15-2008 10:25 PM |
| how to delete line with matching text and line immediately after | orahi001 | UNIX for Dummies Questions & Answers | 6 | 01-15-2008 12:34 AM |
| Combine output on same line | theninja | Shell Programming and Scripting | 3 | 01-14-2008 04:21 AM |
| Combine reports and append a line between each | ldevito1 | Shell Programming and Scripting | 2 | 11-08-2006 12:35 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to combine text data into one line?
The following input needs to be manipulated as follows:
INPUT from file or results of command: ============start: Medium identifier : a45c0213:47eb5485:0aec:0321 Medium label : SQL Disk_11516 Location : [Windows_System_Library: /backup_09/a45c0213547eb4d2750aec50315.fd] Protected : None Medium identifier : a45c0213:47f09a86:0bbb:00d5 Medium label : SQL Disk_11582 Location : [Windows_System_Library: /backup_02/a45c0213547f08c5250bbb500ce.fd] Protected : None Medium identifier : a45c0213:47ecac55:0aec:040a Medium label : SQL Disk_11536 Location : [Windows_System_Library: /backup_02/a45c0213547ecac5550aec50408.fd] Protected : None Medium identifier : a45c0213:47f5e816:0b15:01bc Medium label : SQL Disk_11609 Location : [Windows_System_Library: /backup_09/a45c0213547f5e81650b15501ba.fd] Protected : 05/04/08 04:55:56 Medium identifier : a45c0213:47fb2681:1e72:0052 Medium label : SQL Disk_11649 Location : [Windows_System_Library: /backup_10/a45c0213547fb268151e725004f.fd] Protected : 05/08/08 04:50:02 finish==================== Notes: the results are formatted so that the first ":" lines up. The ========start and finsih======= are not part of the results Need to process the input so that the results yield: a45c0213:47fb2681:1e72:0052,SQL Disk_11649,/backup_10/a45c0213547fb268151e725004f.fd,None[orthe date shown next to Protected] (all on 1 line) Each record Starts with the Medium identifier line and ends with the Protected line. Thank you. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|