#!/bin/bash istart=1 iend=56 for ((i=$istart;i<=$iend;i=i+1)) do cat << EOF >> orbvol.txt 5 4 $i 4 0.25 0 13 11 13 -1 12 1 11 0.05 6 -1 -1 EOF done echo "q" >> orbvol.txt echo "Running Multiwfn..." Multiwfn examples/excit/D-pi-A.fchk < orbvol.txt >> result.txt grep "Volume:" result.txt | nl -v$istart rm ./orbvol.txt result.txt