Exercise 1: Modify the passwords of all ordinary users to random passwords, and save the random passwords in the pass.conf file;
Exercise 2: Change the extension of all files in any directory under individual users to bak
Exercise 3: Write a script to count how many directory files are in the / etc / directory
[-d FILE] True if FILE exists and is a directory.
Exercise 4: Write a script
1. Say hello to each user in / etc / passwd in turn, and say what the ID
of the other party is. The effect is as follows:
Exercise 5: Write a script. The
following functions are required: when executing a program, the program will let the user choose boy
or girl; if the user enters B or b, it will display: He is a boy;
if the user enters When G or g, it displays: She is a girl; if it is other than B / b / G / g
, it displays: I don't know.
Exercise 6: Write a script. It is
required to generate a random integer num1 from 0 to 9, and enter an integer num2 from 0 to 9 from the keyboard. Use num1 and num2 to perform the remainder and division operation, and compare the results of the remainder and division results.