I am experiencing the following difference in using a pipe and using a file input when updating a perforce job: When doing the update (in a windows cmd shell) as follows:
(echo job: job00101&echo.status: open&echo.description: One line only)|p4.exe -p myServer:1234 -u myUser job -f -i
the description in the job has an additional blank at the end, and an additional empty line. (Visible, when editing the job with P4V)
When I try the same using two commands and an intermediate file
(echo job: job00101&echo.status: open&echo.description: One line only) >test.txt
p4.exe -p myServer:1234 -u myUser job -f -i <test.txt
the description consists of exactly one line without a trailing blank. That is what I would also have expected when using the pipe.
What I need is a one line command without the need of an intermediate file. And I do not understand why the pipe does not work the same as the file output and input.