script to add 10000 users


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers script to add 10000 users
# 1  
Old 07-06-2010
script to add 10000 users

Hi All i have written the script to add 10000 users, when i execute the script it had no errors ,but the script is not adding the users.
pls correct me. i want it using while loop

HTML Code:
 
#!bin/sh
count=0
while [ $count -gt 10000 ]
do
useradd username$count
count=`expr $count + 1`
done
~
# 2  
Old 07-06-2010
Your while loop is executing the statements while $count is greater than 10000. I think you want less than.
# 3  
Old 07-06-2010
ya.....

thakq....
its working..........
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to for awk print divide value more than 10000?

I have a text file with data in the following format. 042240.Thor!Loki: Asgard>Seus>/usr/Valhalla/Niflheim/Asgardianos/Seus.ec@266:Service Success => Diff time: 25689 msec, Energy loss = 212, Subr = 6969] 042240.Thor!Cap: Asgard>Hera>/usr/Valhalla/Niflheim/Asgardianos/Hera.ec@252:Begin call... (1 Reply)
Discussion started by: ooilinlove
1 Replies

2. Shell Programming and Scripting

Generate 10000 unique audio file of 2MB each using shell script.

Hi, I want 10000+ unique Audio file of approx 2MB each. How can i generate numerous audio files using shell script. Any tool, command or suggestions are welcome. If i give one audio seed file then can we create numerous unique files with same seed file? Any help is highly appreciable.... (11 Replies)
Discussion started by: sushil.kumar
11 Replies

3. Shell Programming and Scripting

Script to add new users to a group on multiple servers using SSH

Hi Experts, I am new to scripting. We have around 400 Linux servers in our environment. I want to add a new user to a perticular group on all the servers using SSH. Requirements: 1) Need to take the server names from a text file. 2) Login into each server and check whether perticular... (1 Reply)
Discussion started by: Satya1983
1 Replies

4. UNIX for Advanced & Expert Users

SQL script with 86000 lines: new files with only 10000 lines (per file)

Hi this is my SQL script $ wc -l insert_into_customers.sql 85601 insert_into_customers.sqlI wish to cut this file into 9 files each 10000 lines (the last one less) $ wc -l insert_into_customers_00*.sql 10000 insert_into_customers_001.sql 10000 insert_into_customers_002.sql ... (1 Reply)
Discussion started by: slashdotweenie
1 Replies

5. Shell Programming and Scripting

Addsudoers: A script to add users or groups into /etc/sudoers

Well, sudo is a great tool for delegating permissions among admins. But, it's really hard to find a great tool which would give an interactive way of editing /etc/sudoers file. Now, when I say "editing", I really refer to add new groups, users, aliases in the /etc/sudoers file. visudo is great... (2 Replies)
Discussion started by: admin_xor
2 Replies

6. UNIX for Dummies Questions & Answers

Merge files into groups of 10000

Hi Guys, First post! I've seen a few options but dont know the most efficient: I have a directory with a 150,000+ text files in it I want to merge them into files contain 10,000 files with a carriage return in between. Thanks P The following is an example but doesnt limit the... (2 Replies)
Discussion started by: peh
2 Replies

7. Solaris

Shell script to add users on solaris

Hi admins, I am trying to run a script to add users on solaris with password: I am using crypt for passwords: The part of my scripts is as below: if ; then echo "$username exists!" exit 1 else pass=$(perl -e 'print... (5 Replies)
Discussion started by: snchaudhari2
5 Replies

8. Shell Programming and Scripting

Need Script to Validate and Add more users one time

I need a script to validate and add more than one user at one time Field 1 - FirstName LastName Field 2 - userid Field 3 - email address Field 4 - department Validation for Field 1 No... (3 Replies)
Discussion started by: karthikn7974
3 Replies

9. UNIX for Dummies Questions & Answers

Sun E 10000 scripted shutdown

Howdy all. I am trying to configure a command file to be executed from a Sparc station to an E10000 to shut down at the same time. I do not have the hardware in which to actively test the script, but I do need some guidance, and Sun's documention on the E10000 leaves alot to be desired. Here... (1 Reply)
Discussion started by: redfoot
1 Replies
Login or Register to Ask a Question