First, homework (exercise) content:
1. Describe the operation principle of shell program (can be attached with necessary graphic instructions);
2, summarize all the knowledge points involved in shell programming (such as: variables, grammar, command status, etc., to take the picture of Yo);
3, summarize the course of all the circular statement, the use of conditional judgment and related examples; (if (jpg|png is not exist); echo "You say a XX")
4. Write a script: If a path does not exist, it is created as a directory; otherwise it is present and the content type is displayed; (Don't doubt it's that simple)
5, write a script to complete the following functions; Judging the given two values, which is the big or small; the method of the given number: script parameter, command interaction; (still so simple using read)
6, the sum of all the odd numbers within 100 (at least 3 methods. Yes, this is our assignment. ^_^)
7, write a script to achieve the following functions:
(1) Pass two text file path to script;
(2) Show the number of blank lines in two files and their blank lines;
(3) Show the total number of files in two files and their total number of rows;
8. Write a script
(1) Prompt the user to enter a string;
(2) Judgment:
If the input is quit, exit the script;
Otherwise, the string content of its input is displayed;
9, write a script, print 2^n table; n equals the value entered by a user; (Sorry, I'm naughty)
10, write a script, write a few functions: function 1, to achieve the sum of two numeric values, function 2, take a given two numeric value of greatest common divisor, function 3, take a given two numeric value of least common multiple; the selection of the function, two values will be entered through the script parameters.
This article is from the "Egg Guest It World" blog, please be sure to keep this source http://2507705.blog.51cto.com/2497705/1694460
Bash Shell Summary and examples