#!/bin/bash -

declare -a a
declare -A b

exec <list.txt >nodup.txt

IFS=';\n'

while read -ra a
do
    b[0] = a[0]
    b[1] = a[1]
    b[2] = a[2]
    b[3] = a[3]

    while (( i < #a[@])

    for i in "${a[@]}"; do b["$i"]=1; done
    printf '%s;' "${!b[@]}"
    printf '\n'
done > nodup.txt
