HOW TO CREATE 10 USERS IN UNIX(HP-UX) USING SHELL
SHELL SCRIPT?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / pitambar mishra
My dear friends,
you have used 'useradd' command in the script through which we can only add the user name. But for adding password you should use 'passwd' command because password is also mandatory.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
c program which accept one argument as a directory name and prints all the file name along with its inode number and total count of the file in directory
Create a bash shell script to sort and then uniq the file from the command line & store it to a new file and output the results to the screen. Name this script "sortAndUniq.sh"
What does sh mean?
What does it mean to debug a script?
Is bash a shell script?
what are special characters and explain how does text varies by the usage of single quotes,double quotes and back quotes?
What is inside a seashell?
wats the deinitions for shell utility and filter?
What is shell and terminal?
Where are cowrie shells found?
Explain about echo command?
What is the use of break command?