bug-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-recutils] Support for the set-add operation in recset


From: Jose E. Marchesi
Subject: [bug-recutils] Support for the set-add operation in recset
Date: Fri, 21 Jan 2011 20:50:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

Hi.

recset now supports the -S operation, that sets the value of a named
field if it exists in the matching records.  In case a field with the
given name is not found, it is added to the record.

So, given the following record:

Id: 100
Summary: This is task 100
ClosedAt: Mon Jan 17 12:30:23 CET 2011

If we execute

recset -e "Id = '100'" -f ClosedAt -S `date`

the record will change to:

Id: 100
Summary: This is task 100
ClosedAt: Fri Jan 21 20:48:54 CET 2011

It has the same effect than -s in this case.  But if the record does not
contain a field named ClosedAt, -S will add it.

-- 
Jose E. Marchesi    address@hidden
GNU Project         http://www.gnu.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]