this is a done version of the previous thread. it concatenate all the arguments if they are not the same... however some case will make it a:a:b:a:b:c i try to change all the : into space and then uniq them out.... but the uniq is not working this way i guess... does anybody know why? thank you
#!/bin/sh
NP=$1
shift
for P
do
case $NP in
$P|$P:*|*:$P:*|*:$P) continue;;
*) NP="$NP:$P";;
esac
done
second=`echo $NP | tr ':' ' ' | uniq -d `
echo $second