% Time :~ Meanings in %

Source: Internet
Author: User

Oh, this is due to the time format problem. The last two characters are in milliseconds, which is not needed by ordinary people. The format is a bit more than a few minutes or seconds, therefore, this is used to remove the last three characters. The first 0 indicates that the offset is 0, that is, to take the first character. Starting from the first character,-3 indicates that the last three characters are removed. The previous 0 can also be omitted here. I understand. I don't know if I have made a mistake. I don't know if you have understood this much. I can search for such posts on the Forum, and lxmxn also wrote such posts, as well as batch processing. Be sure to take a good look when you are free.

From set /? Extracted help:

% PATH :~ 10, 5%
The PATH environment variables will be extended, and then only 11th (partial
10 characters. If no length is specified, the default value is used.
Value, that is, the remainder of the variable value. If both numbers (offset and length) are negative,
The number used is the length of the environmental variable value plus the specified offset or length.
% PATH :~ -10%
Extracts the last 10 characters of the PATH variable.
% PATH :~ 0,-2%.
All characters in the PATH variable, except the last two.
Example:
D: \> echo % time %
22:41:02. 15
D: \> echo % time :~ -3%
. 77
D: \> echo % time :~ 0,-3%.
22:41:19
D: \> echo % time :~, -3%
22:41:26
D: \> echo % time :~ 0, 2%
22
D: \> set a = 12345678
D: \> echo % :~ -5:-1%
4567
D: \> echo % :~ -5:-2%
456
D: \> echo % :~ -5:-5%
ECHO is on.
D: \> echo % :~ -5:-6%
ECHO is on.
D: \> echo % :~ -5:-4%
4

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.