This is the mail archive of the
cygwin-talk
mailing list for the cygwin project.
Re: My pipe flushes late
- From: Brian Dessent <brian at dessent dot net>
- To: The Vulgar and Unprofessional Cygwin-Talk List <cygwin-talk at cygwin dot com>
- Date: Wed, 20 Aug 2008 06:30:49 -0700
- Subject: Re: My pipe flushes late
- References: <g8h0l5$dv8$1@ger.gmane.org> <48AC108E.1D666660@dessent.net> <g8h5bl$vsd$1@ger.gmane.org>
- Reply-to: The Vulgar and Unprofessional Cygwin-Talk List <cygwin-talk at cygwin dot com>
- Reply-to: The Vulgar and Unprofessional Cygwin-Talk List <cygwin-talk at cygwin dot com>
Robert Schmidt wrote:
> ... where d2u can probably be removed now.
> It's used to timestamp output from various services, some of which
> output DOS line endings. E.g. my-service.sh | prefix-time.sh.
>
> If there was a way to execute a command (date, in my case) from within
> the sed replacement section, I'd be home free with a single sed process
> instead of a chunky bash process lurking about.
my-service.sh | perl -MPOSIX -ne 'print strftime("%F %T ", localtime), $_'