两根发2004-12-09 19:11:20
//test.cpp
/*
int main()
{
string file1, file2, outfile;
cout<<"enter the input file name:";
cin>>file1>>file2;
cout<<"enter the output file name:";
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


两根发2004-12-09 19:22:11
SORRY,上面贴子里的 SCRIPT 写错了,看这贴子
两根发2004-12-09 19:25:27
原来不是我写错, 是显示不出来啊,我再试试
两根发2004-12-09 19:28:15
啊啊..怎么会这样, 再试...
两根发2004-12-09 19:32:24
终于出来了.我汗啊~~, 各位高手看这里吧.先谢谢了!!!
闲来无事者2004-12-09 21:30:20
写个batch file(Shell Script)
两根发2004-12-09 21:40:05
再傻傻的问....
闲来无事者2004-12-09 21:44:24
给你个link...
两根发2004-12-09 21:52:24
真的非常感谢你!!
两根发2004-12-09 23:39:39
呵呵...搞定了.再说声谢谢...