00006.Shell USE

xiaoxiao2021-03-06  75

1. How to redirect the error output to the file When using the Make compiler in Linux, then most of the information will be rolled on the screen, which brings us to our debugging, using redirects Convenient to solve this problem. Try to use the following command: 1) make 2 >> log.txt 1 >> log.txt or 2) make 2> & 1 | more explanation: 1) 2 >> log.txt 1 >> log.txt refers to Redirect files from 1, 2 to log.txt, in which the file number is 2 in the C language corresponds to stderr (standard error), 1 corresponds to stdout. 2) 2> & 1 Indicates redirects the error output to the standard output and then transmits it to the more page display via the pipeline. 2, AWK handles a file awk '{print "Objcopy -g" $ 9 ";"}' lib.txt >> Objlib3, the regular expression syntax comparison of various tools (GREP, SED, AWK, Perl, Vim, JavaScript) http://blog.chinaunix.net//article.php?articleid=2466&blogid=634

转载请注明原文地址:https://www.9cbs.com/read-92836.html

New Post(0)