Tuesday, June 18, 2013

UNIX/Linux Shell script to create multiple users

Example 1:








NOTE: {1..5} syntax will not work in certain shell. But it will work definitely in bash.

Example 2:

cat > user.list
vijay
sanjay
ajay
sujay

for user in `cat user.list`;do useradd $user;done

grep -i jay /etc/passwd | cut -d: -f1
vijay
sanjay
ajay
sujay

2 comments:

Raaaj said...

sooper VJ

Patrick Co Eban said...


Networking Projects for Final Year CSE Students


The IEEE Network projects Networking Projects for Final Year CSE Students has direct impact on undergraduate and graduate student education and training. Final Year Engineering Students who are software developers can structure a project around building a network firewall application Final Year Project Centers in Chennai

JavaScript Training in Chennai

JavaScript Training in Chennai