#!/bin/bash
IFS='
'
exec 3<>data.txt
while read -u 3 line
do
(
IFS=' '
result=()
for word in $line
do
[[ ! "${result[*]}" =~ "$word" ]] && result=(${result[*]} $word)
done
echo ${result[*]}
)
done