Need help with script when trying to modify user

The script get a csv file with 2 colls for example:
123456,UNIX
963852,Microsoft

the script supose to put the number in the Description of the user in this case UNIX or Microsoft
the error i get is

does not exist.OR: UNIX
does not exist.OR: Microsoft

but the users exist so i do not understand
if i do

 usermod -c 123456 UNIX

it works
this is what i have for now:

n=`wc -l < users.csv`

i=1

while [ "$i" -le "$n" ]

do

line=`cat users.csv | head -$i | tail -1`

#echo $line

user=`echo $line | awk -F"," '{print $2}'`

ID=`echo $line | awk -F"," '{print $1}'`

usermod -c $ID $user

i=`expr $i + 1`

done

1) Try not to use variables like user and ID as they may have other meanings. For instance on my system the id command will tell me somehting about myself.
2) Why not echo sel_usr and sel_id variables after you set them to make sure your assignments are ok?

when i print out the variables like this

echo $ID $user
it prints out ok the ID and the User

but when i print out the
echo $user $ID
it does not print out the users just the ID

somthing wiered

Your script is too complex, try this.

 
sed 's/,/ /' user.csv |  while read id user; do usermod -c  $id $user ; done

where should i but put the line you wrote?

i tried just to run the ROW you wrote in the shell Console but it gives me somthing like
"while: Expression syntax"

Or even slightly simpler:

IFS="," ; while read id user ; do echo usermod -c $id $user ; done < users.csv

---------- Post updated at 07:40 ---------- Previous update was at 07:37 ----------

It would replace your whole script.

Refrain from using csh/tcsh and use instead a POSIX compliant shell like ksh or bash.

i changed the echo command and removew the echo or else i just got the ouput of the command

usermod -c 123456 UNIX
usermod -c 123456 Microsoft

after that the command you gave me printed out the same error of :

does not exist.OR: UNIX
does not exist.OR: Microsoft

Correct. I missed to remove that echo command before posting.

The second line should be:

usermod -c 963852 Microsoft

Your users.csv file is broken. You need to remove extra carriage-return characters from it.