Thanks, works great
)
I have one more question about this.
If the textfile looks like this, it's a file with user and their passwords and home dirs.
E.x.
cool -p hithere -b /home/xxx/
fast -p fast -b /home/xxxx/
So if I run
useradd `cat usersfile.txt`
there can only be one user in the textfile.
Is it possible to run the useradd command for each line in the textfile.
I wrote a perl script for this a year ago, but if it could be solved with this stuff I'm talking about it would be great :-)
Thanks