Hi Feng, It is as simple as for i in `seq 4 1 6 `; do meep test_$i.ctl | tee out_test_$i ; done which redirects each run into a distinct output file.
The distribution doesn't matter, "for" and "seq" are native bash commands. Hope this was what you were looking for; Marco Zocca Dept.of Photonics Engineering Technical University of Denmark Message: 4 Date: Tue, 19 Oct 2010 23:11:58 +0800 (CST) From: ad_hu <[email protected]> Subject: [Meep-discuss] How to change filename prefix in a loop To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset="gbk" Hi all, I could change filename prefix in command-line for a single simulation through the following command in bash meep filename-prefix=' " test" ' test.ctl But how to change filename prefix for a loop? For example, there is parameter f in test.ctl. I want to realise a loop for paramter f and output with different filename prefix. (for i in `seq 4 1 6 `; do meep f=$i test.ctl; done) this will realise the loop for f=4 ,f=5 and f=6. If I want to prefix test_4, test_5 and test_6 for the three simulations,respectively. How should I do? the OS is fedora 13. Any suggestion will be appreciated. feng _______________________________________________ meep-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

