SORRY,上面贴子里的 SCRIPT 写错了,看这贴子

//test.cpp
/*
int main()
{
string file1, file2, outfile;
cout cin>>file1>>file2;
cout cin>>outfile;

return 0;
}
*/

//filename1.txt
test1a.txt test1b.txt
out1.txt

//filename2.txt
test2a.txt test2b.txt
out2.txt

//filename3.txt
test3a.txt test3b.txt
out3.txt


//script
g++ test.cpp
./a.out g++ test.cpp
./a.out g++ test.cpp
./a.out

SO in linux, I just need run the script.
But I have lots of files to test, is that possible if I put all test filenames in one .txt file? such as

//filename.txt
test1a.txt test1b.txt
out1.txt
test2a.txt test2b.txt
out2.txt
test3a.txt test3b.txt
out3.txt


and how to write the script? (need a loop inside the script?)
Anyone has an idea ?
Thank you

所有跟帖: 

原来不是我写错, 是显示不出来啊,我再试试 -两根发- 给 两根发 发送悄悄话 (382 bytes) () 12/09/2004 postreply 11:25:27

啊啊..怎么会这样, 再试... -两根发- 给 两根发 发送悄悄话 (333 bytes) () 12/09/2004 postreply 11:28:15

终于出来了.我汗啊~~, 各位高手看这里吧.先谢谢了!!! -两根发- 给 两根发 发送悄悄话 (1000 bytes) () 12/09/2004 postreply 11:32:24

你可以在你的test.cpp 里loop啊 -闲来无事者- 给 闲来无事者 发送悄悄话 (253 bytes) () 12/09/2004 postreply 11:51:30

如果test.cpp 不能改怎么办... -两根发- 给 两根发 发送悄悄话 (345 bytes) () 12/09/2004 postreply 12:52:19

写个batch file(Shell Script) -闲来无事者- 给 闲来无事者 发送悄悄话 (8 bytes) () 12/09/2004 postreply 13:30:20

再傻傻的问.... -两根发- 给 两根发 发送悄悄话 (49 bytes) () 12/09/2004 postreply 13:40:05

给你个link... -闲来无事者- 给 闲来无事者 发送悄悄话 (48 bytes) () 12/09/2004 postreply 13:44:24

真的非常感谢你!! -两根发- 给 两根发 发送悄悄话 (0 bytes) () 12/09/2004 postreply 13:52:24

呵呵...搞定了.再说声谢谢... -两根发- 给 两根发 发送悄悄话 (0 bytes) () 12/09/2004 postreply 15:39:39

请您先登陆,再发跟帖!