HOW TO CREATE 10 USERS IN UNIX(HP-UX) USING SHELL
SHELL SCRIPT?

Answer Posted / dibala

#!/bin/ksh
set -x #on
#variable
i=1
while [ i let 10 ]
do
/usr/sbin/useradd user$i -d /home/user$i -s /bin/ksh -m
user$i
i=$(expr $i + 1)
done

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is web script?

587


i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..

1795


What is a command line shell?

569


What are the default permissions of a file when it is created?

501


How can you find out how long the system has been running?

530






Explain about shebang?

624


What is the best shell scripting language?

545


How to print the first array element?

559


How to get the first line from a file using just the terminal?

600


What is the difference between grep and egrep?

616


Can shell script run on windows?

572


Explain how you Automate your application using Shell scripting.

1854


Explore about environment variables?

599


Determine the output of the following command: [ -z “” ] && echo 0 || echo 1

561


write a shell script to check the failed jobs?

3961