Re: storing the output of the command-line loop

Mehdi Kamali <[email protected]> Tue, 18 Dec 2012 14:41:57 +0330
Newsgroups gmane.comp.science.photonic-bands
Message-ID <CAFo2zU+oMh4XECFqmzkO2SC7DLSbfB8ijpmxZM8H2z7fsRSC=w@mail.gmail.com>
Dear Roya

Just add the x variable at the end of output file for each run as :

for x in `seq a dx b`; do mpb  myfile.ctl | tee output_$x.out ; done

Best Regards

Mehdi


> Message: 1
> Date: Mon, 17 Dec 2012 11:10:42 +0000 (UTC)
> From: Roya <[email protected]>
> To: [email protected]
> Subject: [MPB-discuss] storing the output of the command-line loop
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=us-ascii
>
>
>
> Dear MEEP developers and users,
>
> I have a problem with the following command:
>
> for x in `seq a dx b`; do program  myfile.ctl; done
>
> Using this command I have been able to run my ctl file several times and I
> can
> see the progress in the terminal.  However, the end file just has the data
> belonging to the last iteration of the loop.
>
> That is, at each iteration the file is overwritten.
> Please let me know how I can avoid this.
>
> Also, I would appreciate it if someone clarifies the function of x=$x in
> this
> command.
>
> Many thanks,
> Roya
>
>
>
>
> ------------------------------
>
> _______________________________________________
> mpb-discuss mailing list
> [email protected]
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss
>
> End of mpb-discuss Digest, Vol 81, Issue 3
> ******************************************
>

_______________________________________________
mpb-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss