Bug 102609

Summary: [patch] Add filtering capability to date(1)
Product: Base System Reporter: Oliver Fromme <olli>
Component: binAssignee: freebsd-bugs mailing list <bugs>
Status: Open ---    
Severity: Affects Only Me CC: olli
Priority: Normal    
Version: 6.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Oliver Fromme 2006-08-28 16:40:18 UTC
Julian Elischer started a thread in the -current mailing list,
proposing an addition to date(1) that turns it into a filter,
reading lines from stdin, adding a time stamp, and writing it
to stdout.  This is Julian's mail that started the thread:

http://lists.freebsd.org/pipermail/freebsd-current/2006-August/065003.html

This PR contains a somewhat different approach to the problem.
It has the same capability as Julian's patch, but it doesn't
require a new command line option letter.  It also provides
better control over the placement of the time stamps, and it
handles arbitrarily long lines.  A description can be found
here:

http://lists.freebsd.org/pipermail/freebsd-current/2006-August/065424.html

Basically, it implements a new conversion specification "%*"
(it can be escaped with a double percent "%%*" sign as usual).
If it occurs in the format string, filter mode is enabled:
A loop is entered, reading lines from stdin and writing to
stdout.  For each line, the format string is expanded as
usual, and the line read from stdin is inserted in the place
of the "%*" character seqeuence.  The result is written to
stdout.

How-To-Repeat: 
	n/a
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:10 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped