Run shell commands from multiple directories.