There is an unload.dat file with the list of .ksh file names. The task is to extract a few parameter details from each of the files that are present in the unload.dat file. Every file contains the below information.
Let us consider for first file name (file_name1.ksh) in the unload.dat:
graph_name = abcd.ksh
export name_a=value_a
export "name_b=value_b"
export name_c=value_c
export name_d=value_d
export name_e="value_e"
export name_f="value_f"
The next file’s fetched data should be appended to the previous file’s output in the same output file.
The output should look like the below:
abcd.ksh name_a value_a 1 filename_1.ksh
abcd.ksh name_b value_b 1 filename_1.ksh
abcd.ksh name_c value_c 1 filename_1.ksh
abcd.ksh name_d value_d 1 filename_1.ksh
abcd.ksh name_e value_e 1 filename_1.ksh
abcd.ksh name_a value_a 2 filename_2.ksh
abcd.ksh name_b value_b 2 filename_2.ksh
abcd.ksh name_c value_c 2 filename_2.ksh
abcd.ksh name_d value_d 2 filename_2.ksh
abcd.ksh name_e value_e 2 filename_2.ksh
1 Answer