#!/bin/bash sel=$1 for filename in /disk/data3/lhcb/elena/B2KShh/ntuples/jobs/*.root do echo "Running selection " ${sel} " on " $(basename "$filename") python selection.py $(basename "$filename") ${sel} done