I try to simply concat the arguments if they are not the same..... what is wrong with this simple code for concat???
#!/bin/sh
result=$1
shift
while [ "$#" -ne "0" ]
do
next=$1
if [ $result = $next ]
then
:
else
$result="$result $next"
fi
shift
done
echo "$result"
if i run it :
$ ./foo a b c
./foo: a=a b: not found
./foo: a=a c: not found
a
why a=a b: not found??? where this came from???