Vlookup not using awk

Hi I just want again to ask for help on what command to use to vlookup f1 group name in "/etc/group" matching f3 of it to "/etc/passwd" f4. I do need to display group name in the output of /etc/passwd without using awk or NR==FNR command. thank you

while
IFS=: read -r f1 f2 f3 f4 f5 f6 f7
IFS=: read -r f1 f2 f3
do
printf "%-20s %-10s %s \n" "$f1" "$f3" "$f6";
done </etc/passwd # </etc/group

Who forbids to use awk ? Is this a homework / classwork exercise, to which special rules apply?

sadly yes. its an exercise having special rules needed.

Then, please, discontinue this thread and reopen in Homework & Coursework Questions - UNIX and Linux Forums after having read the rules (esp this one).

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.