On Fri, 29 Oct 2021 00:24:36 -0400
Viktor Dukhovni <postfix-us...@dukhovni.org> wrote:

> On Thu, Oct 28, 2021 at 10:14:15PM -0400, Viktor Dukhovni wrote:
> 
> >     postqueue -j | jq -nr --argjson $days '
> 
> Correction, that first line should be:
> 
>       postqueue -j | jq -nr --argjson days $days '
> 
> Setting the "jq" variabe "$days" to the shell variable "$days".
> 
> The rest is unchanged:
> 
> >               (now - 86400 * $days) as $too_old
> >             | inputs
> >             | select(.queue_name == "hold" and .arrival_time  <
> >             | $too_old) .queue_id
> >             | select(test("^\\w+$")) # permit only valid queue-id
> >             | syntax
> >         ' |
> >         postsuper -d - hold

Thnx Viktor! Dominic's shell script already put me on the jq path, as
I did not know the "-j" JSON output either. The jq-only is the way to
handle this IMHO.

Thnx everyone here!

R.

-- 
richard lucassen
http://contact.xaq.nl/

Reply via email to