cURL / Mailing Lists / curl-users / Single Mail


Re: reading a log file while open

From: Leif W <>
Date: Fri, 22 Apr 2016 09:30:13 -0400

> On Fri, 22 Apr 2016, Francisco Gonzalez Velasco wrote:
> C:\>curl -o c:\q\events.txt -k -H "Authorization: Bearer My_Authorization" "
> I need to read the contents of the events.txt file while the cURL process is
> still active.
> Is this possible?

Just yesterday I read about a Windows-centric "tail" functionality.
Maybe it will work.

PowerShell has some features which might do the job, may or may not be
documented or available in certain versions, or may not work right at
all. But it may be worth exploring.

Get-Content output.log -Wait | where { $_ -match “regexp” }

Get-Content -Path C:\fso\output.log -Tail 1 –Wait

Otherwise, Google "tail on windows", and find a Windows port of tail, or
some other utility. Some other unix magic, used to involve a program
"tee". Oh, a quick search, PowerShell has something like that now too.
  This may have the advantage of bypassing Windows silly "lock all fopen
writes unless you use our specific non-standard fopen" behavior.

List admin:
Received on 2016-04-22