Index Command

Hi, can anyone explain me how this works (how the flow goes)?

Example:
CLIENT="UNIXHELP"
The second argument passed $2="UNIX"

RESULT=`awk -F"=" '/CLIENTS=/ {len = index($2,"'${CLIENT}'");print len }' $2`

Thanks in advance.

I would like to give a try.

The awk utility searches for string pattern /CLIENT=/ from file name being passed as second parameter to itself having field separator set as '=' and executes an action of assigning the len variable with the position of first occurrence of value held by variable CLIENT if defined in string provided as file name, the output being stored in a shell variable RESULT.

Hope this helps.