From 9edaa6a51eab49a378dd358e0b4254d0398c629f Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 20 Jul 2021 12:17:33 +0200 Subject: src: add --define key=value This patch adds a new option to define variables from the command line. # cat test.nft table netdev x { chain y { type filter hook ingress devices = $dev priority 0; counter accept } } # nft --define dev="{ eth0, eth1 }" -f test.nft You can only combine it with -f/--filename. Signed-off-by: Pablo Neira Ayuso --- doc/nft.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/nft.txt b/doc/nft.txt index 46e8dc53..13fe8b1f 100644 --- a/doc/nft.txt +++ b/doc/nft.txt @@ -44,6 +44,10 @@ understanding of their meaning. You can get information about options by running *--file 'filename'*:: Read input from 'filename'. If 'filename' is -, read from stdin. +*-D*:: +*--define 'name=value'*:: + Define a variable. You can only combine this option with '-f'. + *-i*:: *--interactive*:: Read input from an interactive readline CLI. You can use quit to exit, or use the EOF marker, -- cgit v1.2.3