Dear All,
So I am using some scripts to parse through 100s of files using bash and awk.
In any case, I run into a problem as follows; I have Ubuntu at home on my PC
and I have a laptop at work with Ubuntu, same versions libraries, everything.
When I run the scripts at home they work fine, when I run them at the Ubuntu at
work I get errors ranging from "Bad for loop variable" all the way to an
infanite done at end of line no matter how much you type done.
Does any one know why, or have some other scripts...
Examples of just parsin energy files:
#!/bin/bash
i=1
for ((i=1;i<=1322;i+=1)); do
g_energy -f traj_${i}.edr -o ${i}.xvg << EOF
${i}
EOF
done
or infanite loops
#!/bin/bash
i=1
for (( ; ;)); do
g_energy -f traj_${i}.edr -o ${i}.xvg << EOF
${i}
EOF
done
or range
#!/bin/bash
for i {1..2121} ; do
g_energy -f traj_${i}.edr -o ${i}.xvg << EOF
${i}
EOF
i=$(($i+1))
done
or while loop
#!/bin/bash
i=1while [ i -le 2121 ]; do
g_energy -f traj_${i}.edr -o ${i}.xvg << EOF
${i}
EOF
done
Ill forgo the awk or cat extensions,
does anyone know why? Or have some other pasing scripts they've jimmied?
Stephan
--
gmx-users mailing list [email protected]
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 [email protected].
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists