Piping output to avoid shell errors when piping to sh