I have the following block of data in a txt file :
Informatica(r) PMCMD, version [9.5.1 HotFix4], build [313.0217], SOLARIS 64-bit
Copyright (c) Informatica Corporation 1994 - 2014
All Rights Reserved.
Invoked at Wed Dec 30 11:13:42 2015
Connected to Integration Service: [TEST_Integration_Service].
Integration Service status: [Running]
Integration Service startup time: [Sun Dec 27 06:37:32 2015]
Integration Service current time: [Wed Dec 30 11:13:42 2015]
Folder: [ALS_DIM]
Workflow: [wf_ld_als_dim] version [1].
Workflow run status: [Scheduled]
Workflow run error code: [0]
Workflow run id [0].
Schedule time: [Wed Dec 30 19:00:00 2015]
Workflow run type: [Schedule]
Run workflow as user: [Administrator]
Run workflow with Impersonated OSProfile in domain: []
Integration Service: [TEST_Integration_Service]
Folder: [ALS_FACT]
Workflow: [wf_s_m_ld_interchanges_detail_log] version [1].
Workflow run status: [Scheduled]
Workflow run error code: [0]
Workflow run id [0].
Schedule time: [Mon Jan 04 16:30:00 2016]
Workflow run type: [Schedule]
Run workflow as user: [Administrator]
Run workflow with Impersonated OSProfile in domain: []
Integration Service: [TEST_Integration_Service]
Folder: [ALS_PRD]
Workflow: [wf_maint_service_fields] version [1].
Workflow run status: [Scheduled]
Workflow run error code: [0]
Workflow run id [0].
Schedule time: [Thu Dec 31 07:10:00 2015]
Workflow run type: [Schedule]
Run workflow as user: [Administrator]
Run workflow with Impersonated OSProfile in domain: []
Integration Service: [TEST_Integration_Service]
Number of scheduled workflows on this Integration Service: [3]
Disconnecting from Integration Service
I need to extract data into another text file in such a manner that only the folder name, workflow name, workflow run status, scheduled time and integration service names are extracted—in that order—for every recurrence.
For example:
Insert into <tablename> values('ALS_DIM', 'wf_ld_als_dim', 'Scheduled', 'Wed Dec 30 19:00:00 2015', 'TEST_Integration_Service')
This should be extracted for the first set and so on.
I had developed a script specific to the given 3 sets of data, but it should be such that the script may run for any number of data sets.
I have very preliminary knowledge about shell scripting so it would be great to get some help regarding this.
Insert ...
string or a separateInsert...
for each of the three folders?