[linux] script question

Tristan Burch tburch at u.washington.edu
Wed Mar 10 10:10:11 PST 2004

I'm trying to write a script that will read the username and userid from a
text file and then add that user to the machine with the specified id. I'm
kinda new to scripting, so I'm not sure exactly what I'm doing wrong. Here's
what I have:



cat ${NEW_USERS} | \

while read USER ID


adduser -u $ID $USER

echo Added User:$USER - ID:$ID


when I run it, I get this:

'dduser: invalid numeric argument `551

Added User:tburch - ID:551

I'm not sure why it's chopping off the "a" in adduser, but I think it has
something to do with how the variables get evaluated (?). Any suggestions?


Tristan Burch
<mailto:tburch at u.washington.edu> tburch at u.washington.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/linux/attachments/20040310/385b22e9/attachment.html>

More information about the Linux mailing list