Compare the following two commands typed at the cmd prompt:
Code: Select all
(for %a in (red green blue) do @(echo %a)) > tmp & notepad tmp
Code: Select all
(for %a in (red green blue) do @(echo %a)) | clip
Does anyone know why this happens? Better yet, does anyone know how output from stdin can be piped to the clipboard without trailing spaces?