C
clearguy02
Hi experts,
Below is my scenario:
I have the below C:\groups.txt file, with a city name and an associated
list of people belonging to the city. A portion of the file is as
follows:
===============================
1. Pleasanton
rob
smith
james
nick
2. Livermore
sarah
mary
linda
3. CA
rob
jose
smith
james
nick
sarah
maria
mary
linda
4. Chicago
james
bob
vivian
5. IL
james
bob
simon
vivian
ann
bruce
===================================
I am working on a script that throws the following output:
=======================
1. Parent of Pleasanton is CA.
2. Parent of Livermore is CA.
3. Parent of Chicago is IL.
========================
I am currently using hashes, grep command etc in the scirpt, but I have
no success. Can some one kindly help me with the right algorithm here?
Thanks,
Jim/
Below is my scenario:
I have the below C:\groups.txt file, with a city name and an associated
list of people belonging to the city. A portion of the file is as
follows:
===============================
1. Pleasanton
rob
smith
james
nick
2. Livermore
sarah
mary
linda
3. CA
rob
jose
smith
james
nick
sarah
maria
mary
linda
4. Chicago
james
bob
vivian
5. IL
james
bob
simon
vivian
ann
bruce
===================================
I am working on a script that throws the following output:
=======================
1. Parent of Pleasanton is CA.
2. Parent of Livermore is CA.
3. Parent of Chicago is IL.
========================
I am currently using hashes, grep command etc in the scirpt, but I have
no success. Can some one kindly help me with the right algorithm here?
Thanks,
Jim/