This is my script:
#!/bin/bash SOL_atom_index=116101 number=1 SOL_mol_index=SOL$number index=1 for index in {1..100} do for SOL_index in {116101..136845}
Use ls with wildcard eg:
ls
for eqfile in `ls -l /*.ndx` do sed -i "s/$SOL_atom_index/$SOL_mol_index/g;s/$(($SOL_atom_index+1))/$SOL_mol_index/g;s/$(($SOL_atom_index+2))/$SOL_mol_index/g" $eqfile done
It's not working. I have only numbers and they dont change to SOL, I dont know why