#!/bin/bash for inf in *.inp do echo Running ${inf} ... time psi4 ${inf} ${inf//inp/out} -n 4 echo ${inf} has finished echo done