[Top][All Lists]

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

Re: [bug-recutils] Value Expressions

From: Jose E. Marchesi
Subject: Re: [bug-recutils] Value Expressions
Date: Fri, 07 Sep 2012 10:02:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

    > Yes, but we still have to figure out a way to make the value of other
    > fields available to the filter, i.e. how to pass the existing value of
    > another field to sed, or some composition of fields?
    We could use environment variables, e.g. adding an argument to set a
    named variable to the result of a FEX.  (There are obvious alternatives
    like not passing other fields or passing the whole record in stdin, they
    won't help with the company email example.)

We could simply make all the fields in the matched record available to
the filter command.  It is the syntax to refer to a "field variable"
what is a bit tricky.  The {...} construct proposed by john looks
cleaner than ${...}:

recset -f Email -F "sed -e 's/foo/{Name}/'

Jose E. Marchesi         http://www.jemarch.net
GNU Project              http://www.gnu.org

reply via email to

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