awk command to search based on 5 user input fields

Field1=��
  Field2=��
  Field3=��
  Field4=��
  Field5=��
   

USER INPUT UP TO 5 FIELDS

awk -F , '{ if ( $3 == Field1 && $6 == Field2 && $8 == Field3 && $9 == Field4 && $10 == Field5) print $0 }' /tmp/rodney.outD

INPUT FILE (Rodney.outD):

prd_care_d,CARE_PD,prdensp117,CARE_PD-SCMSProcess-2017-11-11.properties,2017-11-11,SCMSProcess,129,Stream: R2017.11.11,Thu Nov 09 13:22:44 PST 2017,RUNNING,CARE_PD-SCMSProcess-2017-11-11-SCMS_Process_Archive-117A.tra,2017-11-28 19:00,,14370,11-11$
  prd_care_d,CARE_PD,prdensp117,CARE_PD-SerializationProcess-2016-11-16.properties,2016-11-16,SerializationProcess,242,Stream: R2016.11.15,Tue Nov 15 10:21:57 PST 2016,RUNNING,CARE_PD-SerializationProcess-2016-11-16-Serialization_Process_Archive-117A.tra,2017-11-28 19:00,,30765,08-09$
  prd_care_d,CARE_PD,prdensp117,CARE_PD-TugsServiceLoggerProcess-2017-11-15.properties,2017-11-15,TugsServiceLoggerProcess,14,Stream: R2017.11.14,Wed Nov 15 22:50:49 PST 2017,RUNNING,CARE_PD-TugsServiceLoggerProcess-2017-11-15-Tugs_ServiceLogger_Process_Archive-117A.tra,2017-11-28 19:00,,12369,11-16$
  prd_care_d,CARE_PD,prdensp117,CARE_PD-VestaProcess-2017-01-21.properties,2017-01-21,VestaProcess,161,Stream: R2017.01.21,Thu Jan 19 09:37:40 PST 2017,RUNNING,CARE_PD-VestaProcess-2017-01-21-Vesta_Process_Archive-117A.tra,2017-11-28 19:00,,31468,08-09$

Basically what I need is a way to front load each of the 5 fields with a value that will act like a pass thru value on my awk statement. This way I can use the same "==" operator regardless of what the user inputs.

Thanks in advance.

Good example, but I do not get what you want. Can you create some dummy user input data? .... with the expected output. Do a all 5 field variables have to be non-empty?

The 5 fields that are input by the user can be 4 or 3 or 2 or 1 field. That is the "rub". If the user only enters 1 field then the awk command must still have the other 4 fields in it. So I think. I added the -v option at the front of my awk statement so now I am able to pass variables into my command.

Aside coment: in shell, make sure the variables' definitions are enclosed in " (oct 042, dec 34, hex 22), not the locale dependent unicode three byte characters used in post#1. On top, take care to correctly terminate lines (<NL>, \n, ^J, 0x0A only)!