本文共 447 字,大约阅读时间需要 1 分钟。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #include "stdlib.h" #include "stdio.h" void main() { char s[255]; while (1) { printf ( "input cmd: " ); scanf ( "%s" , s); system (s); } } |
输入cmd1|pwd:cmd2指行;
输入cmd1&&cmd2:cmd1指行,cmd2执行;
输入cmd1&cmd2:cmd2执行,cmd1指行并挂住;
输入cmd1 & cmd2:cmd1执行,报错,cmd2执行;
输入cmd1;cmd2:cmd1指行,cmd2执行;
参考:
http://blog.csdn.net/hitwangpeng/article/details/45716821
本文转自fatshi51CTO博客,原文链接: http://blog.51cto.com/duallay/1883487,如需转载请自行联系原作者