今天写一个 python 小游戏,测试的时候意外退出,我不知道,仍然输入 yes ,然后奇妙的事情就发生了!我这是发现了一个 OS X 的 bug 吗 hhhhhhhhhh
今天写一个 python 小游戏,测试的时候意外退出,我不知道,仍然输入 yes ,然后奇妙的事情就发生了!我这是发现了一个 OS X 的 bug 吗 hhhhhhhhhh
1
JeffreyLau OP 卧槽, man yes
|
2
Hello1995 Dec 9, 2015 via Android
内事不决问男人(man),外事不决问维基(wiki)。
|
3
ETiV Dec 9, 2015 via iPhone
越狱了的 iPhone 在 terminal 里执行了一下 yes ……
|
4
JeffreyLau OP @Hello1995 我可是有女票的人👀
|
5
JeffreyLau OP @ETiV hhhhhhh 这个什么效果?好像没法终止
|
6
arbipher Dec 9, 2015
这个是给 pipe 用的
|
7
ETiV Dec 9, 2015 via iPhone
只能按 home 键了……
@JeffreyLau |
8
JeffreyLau OP @arbipher 诶?具体点呢
|
9
JeffreyLau OP @arbipher 竟然会有这种功能
|
10
JeffreyLau OP @ETiV 对哦,,
|
11
shuding Dec 10, 2015
"By running the yes command twice via Terminal under Mac OS X, users were able to max out their computer's CPU, and thus see if the failure was heat related.",哈哈哈……
|
12
Strikeactor Dec 10, 2015
跑几个 yes >/dev/null 2>&1 & 可是暖手的好方法
|
13
arbipher Dec 10, 2015 @JeffreyLau
It's usually used as a quick and dirty way to provide answers to an interactive script: > yes | rm -r large_directory > yes | fsck /dev/foo http://unix.stackexchange.com/questions/102484/what-is-the-point-of-the-yes-command 还可以测试用, yes <anything> | your_script |
14
tanteng Dec 10, 2015
果然有奇妙的事情发生!
|
15
jsfaint Dec 10, 2015
yes no
|
16
xiaket Dec 10, 2015
这个是 unix 下的命令, linux 下也有, 脚本编程经常用的.
|
17
sakeven Dec 10, 2015
。。。 unix 的通用命令
|
18
JeffreyLau OP |