I want to remove the records based on duplicate. I want to remove if two or more records exists with combination fields. Those records should not come once also
This approach may yield false matches if the fields in question can contain a space and are not required to be of equal length. From the sample data, we see that the 4th field varies in length. Perhaps a space awaits as well.
False match example:
1;2 ;3;4 --> _s="1 2 4"
1;2;3; 4 --> _s="1 2 4"
Just in case, best to use the same delimiter as was used to split the input:
_s=$1";"$2";"$4
Alternatively, you can set SUBSEP (which determines what AWK will use as an internal separator for "multidimensional" array subscripts) to ";" which allows you to safely use A[$1,$2,$4].