A few days ago in Imooc casually read a public class, learned a few common commands, recorded here, slowly accumulate. It feels like learning one, sometimes it's better to have a better memory than to follow a book and learn from the beginning.
1. Echo $? This command can print the program return value after the program is run. For example, 0 or 1 is returned in main.
2. Cat T.txt is displayed to the terminal. (The cat command should be a connection, this should be omitted from the standard output)
3../a.out | > T.txt pipeline, Output redirected to T.txt file, here is the overlay method:/a.out | >> T.txt Here is the Append method.
4../a.out | < Input.txt pipeline, input stream redirection.
5. grep ab is found to contain AB. such as LS | > grep AB
6. Continuous execution of GCC main.c-o main.out &&./main.out commands. Only the previous command executes successfully, and the latter one executes. Like./main.out && ls
Linux Common Command accumulation