/ p在集合/ p中是什么意思? [英] What does /p mean in set /p?

查看:1237
本文介绍了/ p在集合/ p中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

/ p set / p = 中代表什么?我知道 / 可以进行切换,而且我很确定我知道 / a 算术。我听到过很多谣言,有人说 / p 是针对提示的说法,也有人说它代表打印。我对此感到有点怀疑的唯一原因是提示是因为在许多情况下,它不要求提示,而是在屏幕上打印,例如

What does /p stand for in set /p=? I know that / enables a switch, and I'm fairly sure that I know /a is for arithmetic. I've heard numerous rumours, some saying /p is for prompt, others stating it stands for print. The only reason I slightly doubt it is prompt is because in many cases it does not ask for a prompt, yet prints on the screen, such as

<nul set /p=This will not generate a new line

但是我想知道的是:我们真的知道它代表什么吗?

奖励积分,适用于所有知道 ping 的开关代表什么的人,例如 -n -w -a -s ,以及中的 / L 用于的含义是什么。 (L = number ?)

Bonus points for anyone who knows what all the switches for ping stand for, such as -n, -w, -a, -s, and what the switch /L in for is meant to stand for. (L = number?)

甚至可以为其他任何命名的人提供更多奖励积分 批处理文件中的愚蠢开关

Even More Bonus Points for anyone who can name any other seemingly stupid switches in batch file

请理解,我已经知道所有这些开关和前缀是什么,是什么意思,我不是询问其含义或目的。

Please understand that I already know what all these switches and prefixes and whatnot mean, I am not asking for their meaning nor purpose. Thanks in advance.

推荐答案

供以后参考,您可以使用 /获取有关任何命令的帮助。 ?开关,它应该解释什么开关做什么。

For future reference, you can get help for any command by using the /? switch, which should explain what switches do what.

根据 set /?屏幕上, set / p 的格式为 SET / P variable = [promptString] ,这表明 / p 中的p是提示。它只是在您的示例中打印,因为< nul 传递了一个nul字符,该字符立即结束了提示,因此它的作用与打印时一样

According to the set /? screen, the format for set /p is SET /P variable=[promptString] which would indicate that the p in /p is "prompt." It just prints in your example because <nul passes in a nul character which immediately ends the prompt so it just acts like it's printing. It's still technically prompting for input, it's just immediately receiving it.

/ L in / L 会生成 L 个数字。

/L in for /L generates a List of numbers.

来自 ping /?

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] | [-k host-list]]
            [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name

Options:
    -t             Ping the specified host until stopped.
                   To see statistics and continue - type Control-Break;
                   To stop - type Control-C.
    -a             Resolve addresses to hostnames.
    -n count       Number of echo requests to send.
    -l size        Send buffer size.
    -f             Set Don't Fragment flag in packet (IPv4-only).
    -i TTL         Time To Live.
    -v TOS         Type Of Service (IPv4-only. This setting has been deprecated
                   and has no effect on the type of service field in the IP Header).
    -r count       Record route for count hops (IPv4-only).
    -s count       Timestamp for count hops (IPv4-only).
    -j host-list   Loose source route along host-list (IPv4-only).
    -k host-list   Strict source route along host-list (IPv4-only).
    -w timeout     Timeout in milliseconds to wait for each reply.
    -R             Use routing header to test reverse route also (IPv6-only).
    -S srcaddr     Source address to use.
    -4             Force using IPv4.
    -6             Force using IPv6.

这篇关于/ p在集合/ p中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆