今天写一个 python 小游戏,测试的时候意外退出,我不知道,仍然输入 yes ,然后奇妙的事情就发生了!我这是发现了一个 OS X 的 bug 吗 hhhhhhhhhh
![]() | 1 JeffreyLau OP 卧槽, man yes |
![]() | 2 Hello1995 2015-12-09 23:51:46 +08:00 via Android 内事不决问男人(man),外事不决问维基(wiki)。 |
![]() | 3 ETiV 2015-12-09 23:54:13 +08:00 via iPhone 越狱了的 iPhone 在 terminal 里执行了一下 yes …… |
![]() | 4 JeffreyLau OP @Hello1995 我可是有女票的人 |
![]() | 5 JeffreyLau OP @ETiV hhhhhhh 这个什么效果?好像没法终止 |
![]() | 6 arbipher 2015-12-09 23:55:29 +08:00 这个是给 pipe 用的 |
![]() | 7 ETiV 2015-12-09 23:56:21 +08:00 via iPhone 只能按 home 键了…… @JeffreyLau |
![]() | 8 JeffreyLau OP @arbipher 诶?具体点呢 |
![]() | 9 JeffreyLau OP @arbipher 竟然会有这种功能 |
![]() | 10 JeffreyLau OP @ETiV 对哦,, |
![]() | 11 shuding 2015-12-10 00:09:04 +08:00 "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 2015-12-10 00:10:37 +08:00 跑几个 yes >/dev/null 2>&1 & 可是暖手的好方法 |
![]() | 13 arbipher 2015-12-10 00:22:34 +08:00 ![]() @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 2015-12-10 00:42:45 +08:00 果然有奇妙的事情发生! |
15 jsfaint 2015-12-10 09:24:57 +08:00 yes no |
![]() | 16 xiaket 2015-12-10 09:30:32 +08:00 这个是 unix 下的命令, linux 下也有, 脚本编程经常用的. |
![]() | 17 sakeven 2015-12-10 11:41:04 +08:00 。。。 unix 的通用命令 |
![]() | 18 JeffreyLau OP |