1. Create 100 directories in the/home directory with a directory name of a1......a100.
2. Write a script that automatically packages all files less than 5KB in the home directory into XX.tar.gz. (Hint: Use Ls,grep,find and other commands, files generally refer to ordinary files)
3. Write a program that can take out the first column of/ET/PASSWD, and each column is displayed with a line of string "The 1 account is" root "
4. Write a program, his role is to look at the/root/test/logical this name exists, if not, create a file. Use touch to create, leave after creation is complete, and if present, determine if the name is a file, and if it is deleted, create a new directory. The file name is Loglical, then left, and if present, and the name is directory, delete the directory.
5. Write a shell script that reads 10 numbers from the keyboard, showing the maximum and minimum values.
6. Write a script to print any number of multiplication tables. Print If you enter 3
1*1=1
2*1=2 2*2=4
3*1=3 3*2=6 3*3=9
7. Write a script, enter your own birthday time (YYYYMMDD), and calculate how many days and hours are your birthdays.
Each instance is oneself by looking for the material to write out, through own writing, did learn a lot of things!
Shell Programming Examples