//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
./a.out
./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
How to write a script in Linux
所有跟帖:
• SORRY,上麵貼子裏的 SCRIPT 寫錯了,看這貼子 -兩根發- ♀ (960 bytes) () 12/09/2004 postreply 11:22:11
• 原來不是我寫錯, 是顯示不出來啊,我再試試 -兩根發- ♀ (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