Batch common special symbols

@

Close command echoing symbols on the front of the command line, the command line can be shielded itself.

%

Strictly speaking, this symbol is not really a command, it is only in the batch parameters only (except in the case with the use of multiple%). This symbol is very special, complicated usage.

|

Command pipeline at the output of the previous command when a command to the input parameters used.
Format: first command | second command | [| third command ......]

>、>>

Both commands output redirection operator, is in front of the output of a command to write to a file.
The only difference between these two commands is that the ">" will be removed after the contents of the original file to the new content written to the original file,
and ">>" additional new content to the end of the original document, which will not change original content.

<

Input redirection command, the command reads input from a file, rather than read from the keyboard.

>&

The output is written to a handle input of another handle.

<&

And just> & contrast, reading from input and writes them to a handle to the output of another handle.

^

Escape character, it is the symbol of the special features and remove the carriage return, only instead of using it as a symbol of their special significance.

&

Combine command, its role is used to connect n-DOS command, and to execute the commands in sequence, regardless of whether the command fails.
Syntax: a first & second command command [& third command ...]

&&

Combination command, which command both before and after it is connected, according to the order of execution of these commands.
And command & The difference is that, in the future it will automatically determine when to perform several commands in order to be connected to it in the past whether or not there is a command execution error,
if it is found not to continue with the rest of the command back after an error.

||

Command symbol combination, this method may be performed multiple commands, when a command fails after the second execution command,
when the command to perform the correct encountered, all commands will not be executed later.
If the correct command does not appear, it has been completed for all of the command execution.
Tip: Use a combination of the command and the command together with the weight must be noted that the priority, the higher priority command pipeline redirect command, the redirect command priority level is higher than the command combination.

""

Delimiter string representing the contents is defined as a character in double quotes.
Commonly used in the file, the case folder names with spaces, as well as the string representation.

,

Comma is equivalent to a space, in some cases, can be used as a space to use.

;

When the command is the same, different targets may be isolated by a semicolon, perform the same effect.

()

Left and right parentheses must be used in pairs, in parentheses can contain multiple lines of commands that will be seen as a whole,
regarded as a command line that compound statement. At this point, if you use parentheses to dynamic real-time code value, you need to use a variable delay.

!

Exclamation variable delays (setlocal enabledelayedexpansion) used to represent the variables. Ie% var% becomes! Var !.

Guess you like

Origin www.cnblogs.com/smallshell/p/11720338.html