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

3 comments:

BharathKumarRaju Dasararaju said...

sooper VJ

ERP said...

Hi,

your article so informative and i have cleared all of my doubts.
your way of explanation is awesome thank you for sharing useful information.

regards,
Oracle Fusion HCM Training

shivani said...

A befuddling web diary I visit this blog, it's incredibly grand. Strangely, in this present blog's substance made motivation behind fact and sensible. The substance of information is instructive
Oracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training