On Thu, Jul 5, 2012 at 6:03 PM, lloyd riggs <lloyd.ri...@gmx.ch> wrote:
>
> Does any one know why, or have some other scripts...
>


My suggestion would be something in the lines of

#!/bin/bash

for i in $(seq 2121) ; do
g_energy -f traj_${i}.edr -o ${i}.xvg <<< "${i} 0"
done

===

Notice the "in" keyword right after 'i'.

I used a subshell to invoke the program 'seq', which generates a
sequence from 1 to the given argument, so we don't depent om how these
other constructs with ((; ; )) work among different versions of bash.

I also suggest replacing the here-document by a here-string, but
that's personal taste. You may or may not have problems with older
versions of bash

Greetings from a foggy Groningen,
-- 
Elton Carvalho
Tel.: +55 11 3091-6985/6922
Dept Física dos Materiais e Mecânica
Instituto de Física
Universidade de São Paulo
P.O. Box 66318 - 05314-970 São Paulo-SP, Brazil
--
gmx-users mailing list    gmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
* Only plain text messages are allowed!
* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
* Please don't post (un)subscribe requests to the list. Use the
www interface or send it to gmx-users-requ...@gromacs.org.
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Reply via email to