And what about getting rid of ls (good with small dirs, but awful with 100+ files dirs) : for a in *; do action1$a action2 $a done