分页: 1 / 1
bash shell如何加载c程序
发表于 : 2011-05-05 16:37
由 lysddp
想在bash shell加载一个c程序(比如当前目录下的test.cpp),并且运行这个c++程序50次,请问在bash shell要怎么写。
Re: bash shell如何加载c程序
发表于 : 2011-05-05 17:31
由 lilydjwg
[bash]
#!/bin/bash
g++ -o test test.cpp || exit $?
for i in {1..50}; do
./test
done
[/bash]
Re: bash shell如何加载c程序
发表于 : 2011-05-05 20:15
由 lysddp
解决了,谢谢2楼的兄弟了
