C
clearguy02
Hi all,
I am struggling with the below puzzle:
Here is the contents of a file, c:\test.txt
============================================================
user id name uid mid
jsmiths john 00206251 00207609
jcarter joseph 00207609 00220458
mstella mary 00202227 00207609
cgoldberg cindy 00220458 00202003
mshiva murthy 00224981 00207609
hwatson henry 00202003 00201869
=============================================================
jcarter is the manager of jsmiths, mstella and mshiva;
cgoldberg is the manager of jcarter;
hwatson is the manager of cgoldberg;
In the output file, I need to replace the mid with the manager id as
follows. And the topmost manager (hwatson) can remain with his id.
================================================
user id name manager id
jsmiths john jcarter
jcarter joseph cgoldberg
mstella mary jcarter
cgoldberg cindy hwatson
mshiva murthy jcarter
hwatson henry hwatson
=================================================
I am uisng the hases and arrays and not getting the desired output.
Can some one help me out here?
Thanks,
JC
I am struggling with the below puzzle:
Here is the contents of a file, c:\test.txt
============================================================
user id name uid mid
jsmiths john 00206251 00207609
jcarter joseph 00207609 00220458
mstella mary 00202227 00207609
cgoldberg cindy 00220458 00202003
mshiva murthy 00224981 00207609
hwatson henry 00202003 00201869
=============================================================
jcarter is the manager of jsmiths, mstella and mshiva;
cgoldberg is the manager of jcarter;
hwatson is the manager of cgoldberg;
In the output file, I need to replace the mid with the manager id as
follows. And the topmost manager (hwatson) can remain with his id.
================================================
user id name manager id
jsmiths john jcarter
jcarter joseph cgoldberg
mstella mary jcarter
cgoldberg cindy hwatson
mshiva murthy jcarter
hwatson henry hwatson
=================================================
I am uisng the hases and arrays and not getting the desired output.
Can some one help me out here?
Thanks,
JC