bash version of stat-all