In Linux, Shell refers to the Shell program that explains commands. It is very convenient to use Linu to compile programs with Shell skills. Here I will introduce two tips to use C Shell as an example ):
1. repeat a statement)
The traditional format is repeat num command.
Num indicates the number of cycles, and command indicates the command to be executed. However, we can use a method to fool C Shell so that the repeat command can execute complicated commands. We can write the complex command to be executed into a file, set the executable bit for the file, and execute the file repeatedly in the repeat loop body;
2. When the redirection character "> &" is used, although the standard error can be written to the file, this will make the standard output and the standard error mixed together, which is not easy to distinguish. Use:
(Yourcommand> & stdout. file)> & stderr. file
The standard output can be written to the stdout. file, and the standard error is written to the stderr. file, thus implementing the separation of the two.