Hello,
I have a file ( say file1) which has lines like below.
xxxx:xxxx,yyyy,1234,efgh
zzzz:zzzz,kkkk,pppp,1234,xxxx,uuuu,oooo
dddd:dddd
here the word before ":" ( ie: xxxx) is the file name and the string after : are also file names, but each file name separated by ","
In case of 1st line- xxxx has dependency on files xxxx,yyyy,1234,efgh
In case of second line - zzzz has dependency on kkkk,pppp,1234,xxxx,uuuu,oooo files.
each file can have No dependency ( like line 3 ) or more and the first file name dependent is always itself.
I have another file( say file2) which has only the master file names with Path which looks like
/data/testing2/zzzz
/data/testing1/xxxx
/data/test/dddd
/data/test3/fffff
now i want create another file ( say file3 "output" ) which has all the file names on separate lines ( with Path if possible) of all dependent files for each of the files in file2
so file3 once the script is run should look some thing like this for ( file1 and file2 as input)
/data/testing1/kkkk
/data/test1/pppp
/data/testing1/1234
/data/test1/xxxx
/data/test1/uuuu
/data/testing3/oooo
/data/testing1/yyyy
/data/test/1234
/data/post/efgh
I would be happy if some one could help me with a script to process this.