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

Answer Posted / nimal

#!/bin/sh
for i in {1..10)
do
echo "creating user"$i;
useradd user$i;
done

to list the created users.

cat /etc/passwd

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

595


wats the deinitions for shell utility and filter?

1841


What is sed in shell script?

568


Explain about "s" permission bit in a file?

609


How will you pass and access arguments to a script in linux?

581






what is tickets $ what low,medium,high priorite pls define time also

1718


c program which behaves like a shell(command interpreter). it has its own prompt say "NewShell$".any normal shell command is executed from your shell by starting a child process to execute a system program corrosponding to the command

4688


Is shell script a programming language?

566


Write the syntax for "if" conditionals in linux?

591


What is @echo off?

560


What is console line?

570


What is shell and terminal?

573


How can the contents of a file inside jar be read without extracting in a shell script?

587


Why do we write bin bash in shell scripts?

546


How would you compare the strings in a shell script?

543