Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of symbols under CMD DOS

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article will explain in detail what is the use of symbols under CMD DOS. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

I. single symbol

~

① means to use enhanced variable extensions in for.

② represents a string that specifies a location using an extended environment variable in% var:~n,m%.

③ represents a unary operator in set/an and inverts the operands bitwise.

!

① unary operators in set / a denote logically non. For example, set / a has zero, where a stands for logic 1.

@

① hides the echo of the command line itself and is often used in batches.

$

① indicates the end of a line in the findstr command.

In the prompt command, ② means to escape (symbolize or effect) subsequent characters.

%

The binary operator of ① in set / a, indicating the arithmetic remainder.

In the ② command line environment, the for command in is preceded by a character (which can be a letter, a number, or some specific character) to indicate that a loop or traversal metric variable is specified.

In a ③ batch, a number followed by a number refers to the specified parameter at the time of the current execution of the batch.

In other cases of ④,% will be removed (batch) or retained (command line)

^

① cancels the escape of specific characters, such as & | >

< ! "等,但不包括%。比如要在屏幕显示一些特殊的字符,比如>

> > | when ^ & and other symbols, you can add a ^ symbol before it to display the characters after the ^. ^ ^ is to display a ^, ^ | is to display a | character.

The binary operator of ② in set/a that represents bitwise XOR.

③ indicates in [] of findstr/r that it does not match the specified character set.

&

① command concatenation characters. For example, if I want to execute two commands at the same time on a line of text, I can connect the two commands with the & command.

② in set/an is bitwise and.

*

① stands for any character, which is what we usually call a "wildcard"; for example, if you want to find all the text files (.txt) in the root directory of disk c, you can type the command "dir c:\ * .txt".

The binary operator of ② in set / a, representing arithmetic multiplication.

③ in findstr/r means that the previous character will be matched multiple times.

-

① range representations, such as date lookups, can be used in the tokens operation in the for command.

② concatenates two characters in findstr/r to indicate a matching range.

③-A switch that follows the / of some commands to indicate the reverse.

④ in set / a:

1. Represents a negative number.

two。 Represents arithmetic subtraction.

+

① is mainly used in the copy command, which means that the + character is about to be used when many files are merged into one file.

The binary operator of ② in set/a, representing arithmetic addition.

This is the end of this article on "what is the use of symbols under CMD DOS?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report