0

I have files molecule416_out.pdbqt, where I am using variable i (molecule$i_out.pdbqt) to loop over all files. But it looks like it is reading the variable as i_out instead of just i. Since all those files are results of long simulations so can't rerun them to remove that underscore from out files. Is there any quick fix? Thanks.

1 Answers1

2

Use molecule${i}_out.pdbqt The ${varname} syntax delimits the part of the string that is the variable name, so the shell can do what you intend.

Sotto Voce
  • 4,131