display in a tree structure
I have to display the data from a file in tree structure(ksh).
The file format is as follows(first field parent, second field child) :
PM01 PM02
PM01 PM1A
PM02 PM03
PM03 PM04
PM04 PM05
PM04 PM06
PM1A PM1B
PM1A PM1C
The output should be like this :
PM01 -- PM02 -- PM03 -- PM04 -- PM05
PM06
PM01 PM1A -- PM1B
PM1C
Anybody have idea ?
Regards,
Thobias
|