I'm trying to extract a list of each .cfg file name mentioned in a file. I've made some progress using sed, but I'm still not there. Any help would be appreciated.
My input looks like this:
07:00:00.000 spn redo [4, 00:53:00, d:/cfg/apple1.cfg, MARY, d:/cfg/apple2.cfg, d:/cfg/pear.cfg, TRUE, FALSE, TRUE]
08:04:36.200 CMD OBJ_INIT [JOHN, d:/cfg/apple3.cfg]
08:04:37.200 CMD OBJ_INIT [JOE, d:/cfg/pear2.cfg]
07:53:26.200 CMD OBJ_INIT [SUE, d:/cfg/apple4.cfg]
06:27:49.717 CMD OBJ_INIT [BOB, d:/cfg/pear3.cfg]
06:12:51.717 CMD OBJ_INIT [SAM, d:/cfg/orange.cfg]
06:27:50.717 CMD OBJ_INIT [SAM, d:/cfg/orange2.cfg]
06:13:10.017 CMD OBJ_INIT [TONY, d:/cfg/grape.cfg]
07:00:00.000 spn redo [4, 00:53:00, d:/cfg/apple5.cfg, MARY, d:/cfg/apple.cfg, d:/cfg/pear4.cfg, TRUE, FALSE, TRUE]
08:04:36.200 CMD OBJ_INIT [JOHN, d:/cfg/apple6.cfg]
And I've been using
sed 's/^.*\(d:\)/\1/'
which has given me this:
d:/cfg/pear.cfg, TRUE, FALSE, TRUE]
d:/cfg/apple3.cfg]
d:/cfg/pear2.cfg]
d:/cfg/apple4.cfg]
d:/cfg/pear3.cfg]
d:/cfg/orange.cfg]
d:/cfg/orange2.cfg]
d:/cfg/grape.cfg]
d:/cfg/pear4.cfg, TRUE, FALSE, TRUE]
d:/cfg/apple6.cfg]
But I don't get the multiple filenames when they are on the same row, and I can't figure how to drop the stuff after the .cfg. What I want is this:
d:/cfg/apple1.cfg
d:/cfg/apple2.cfg
d:/cfg/pear.cfg
d:/cfg/apple3.cfg
d:/cfg/pear2.cfg
d:/cfg/apple4.cfg
d:/cfg/pear3.cfg
d:/cfg/orange.cfg
d:/cfg/orange2.cfg
d:/cfg/grape.cfg
d:/cfg/apple5.cfg
d:/cfg/apple.cfg
d:/cfg/pear4.cfg
d:/cfg/apple6.cfg