View Single Post
Old 09-13-2007   #4 (permalink)
Keith Hill


 
 

Re: Catching stdout AND stderr

"Oisin Grehan" <oising@xxxxxx> wrote in message
news:1189728583.046781.265180@xxxxxx
Quote:

> On Sep 13, 9:34 am, Romu <R...@xxxxxx> wrote:
Quote:

>> Hi all,
>> I'm calling some cygwin utility from PSH: rsyncn scp, ssh...
>>
>> I would like to know how I can catch stdout AND stderr at the same time ?
>>
>> Thanks for your help.
>
> Hi Romu,
>
> Try:
>
> ps> scp args > log.txt 2>&1
>
> This is the same syntax as unix/dos and works fine with legacy apps.
> It's not so good with native powershell cmdlets though since
> powershell has a few more "streams" apart from stdout/stderr. This is
> a popular request (nay, pleading?) from v1 powershell users.
The issue has been submitted here is anyone wants to vote on it:

https://connect.microsoft.com/feedba...7055&SiteID=99

--
Keith

My System SpecsSystem Spec