Allow arbitrary number of args in 'run' block

Replace conditional statement with each_index block to generate output command