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

How to print all the arguments provided to the script?

553


What are "c" and "b" permission fields of a file?

558


What are the different types of commonly used shells on a typical linux system?

550


What is sh in shell script?

573


What is difference between bash and shell?

551






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

555


How do I run a shell script in powershell?

554


How do you know which shell I am using?

587


Print the 10th line without using tail and head command.

1674


Which is better perl or shell scripting?

558


What is console line?

570


What is shell scripting used for?

570


What is $1 in shell scripting?

589


What is bash eval?

545


How do we delete all blank lines in a file?

575