1. log4j
IntroductionLog4j is an open-source project of Apache. It allows developers to output log information at any interval. Log4j consists of three main types of components: 1) logger-is responsible for outputting log information and classifying
# Note: log4j. the properties file needs to be placed in the WEB-INF/classes directory. #1. log4j has five levels of logger: Fatal 0, error 3, warn 4, INFO 6, and debug 7 (Priority: Debug, then all logs are output) #2. configure the root logger. Its
Chapter 3 shell Input and Output3.1.1 echoThe echo command can display text lines or variables, or input strings to files.Echo [Option] string--E parse escape characters--N: Do not use line breaks. By default, line breaks are used in Linux.-Escape
Embedded debugging printf and rintf allocation
In addition to manual analysis, the simplest and most direct debugging method is printf. However, the int printf (const char * format,...) function is not recommended for beginners in C language ,...),
1. Basic concepts (this is the prerequisite for understanding the following knowledge. please be sure to understand it)
A, I/O redirection is usually related to fd, and shell FD is usually 10, that is, 0 ~ 9;
B. There are three commonly used FD
Several Methods for shell scripts to read data:1. keyboard input, default2. Read from the file3. Pipeline Command Transmission
Echo functions:C: Do not wrapF: Paper FeedT: SkipN: line feedEscape, for example: ""/dev/rmt0 "" translated as, "/dev/rmt0"
Linux redirection command application and Syntax 1. Standard input control Syntax: The command file sends the command execution result to the specified file. For example, www.2cto.com ls-l> list writes the result of executing the "ls-l" command to
Linux shell scripts and linuxshell scripts
[This article is my own learning notes. You are welcome to repost it, but please note the Source: http://blog.csdn.net/jesson20121020]
This section describes the basics and operators of Shell scripts.
Linux input/output redirection and file search value grep command
I. file descriptorLinux shell commands can reference some files through file descriptors. Generally, the file descriptors are 0, 1, and 2. In Linux, there are actually 12 file
The following describes how to redirect linux Command applications and syntaxes, including standard input control methods and some command syntaxes. Hope to help you.
1. Standard input control
Syntax: The command file sends the command execution
Shell scripts can read data in the following ways:1. keyboard input, default2. Read from the file3. Pipeline Command Transmission
Echo functions:\ C: Do not wrap\ F: Paper Feed\ T: Skip\ N: line feed\ Indicates escape, for example: "\"/dev/rmt0 "\"
1. keep only the error message:
Make... 2> log.txt # (note that there is no space between 2 and>)
2. Retain error messages and warning messages:
Make...> log.txt 2> & 1
Command syntaxCommand> filename redirects the standard output to a new
Common File redirection commands
Command> filename redirects the standard output to a new file
Command» filename redirects the standard output to a file (append)
Command 1> fielname redirects standard output to a file
Command> filename 2> &
First, let's talk about what is I/O redirection. The so-called I/O redirection is simply a process, which captures a file, or commands, programs, scripts, even the code block output in the script sends the captured output to another file,
When running commands in Linux Shell, each process is associated with three open files and uses file descriptors to reference these files. Because the file descriptor is not easy to remember, shell also provides the corresponding file name.
Standard
2.1. Output redirection:
Command > FileName
REDIRECT standard output to a new file
Command >> filename
REDIRECT standard output to a file (append)
Command > FileName
REDIRECT standard output
when compiling a file, if the compilation process is long, you can output standard error redirection to a file 2 > 1.txt can also be redirected to standard output by pipe 2 > &1standard input, output, and error for Linux shellsTags: linux shellshell
The standard inputs and outputs of Linux are as followsWhen we execute commands in Linux, the commands are output to the console by default, and many times we need to output the commands to other devices, such as the most common in the file, or in
Compile error output to a text file under LinuxCommand > FileName redirect the standard output to a new fileCommand > > FileName REDIRECT standard output to a file (append)Command 1 > Fielname redirect the standard output to a fileCommand > FileName
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.