On Monday 22 February 2021 at 17:26:21, Federico Fanton via Dng wrote:

> On 22/02/21 17:19, Antony Stone wrote:
> >> for table in "${!chains[@]}"; do
> >> 
> >>       echo "${chains[$table]}" | tr : $"\n" | while IFS= read -r; do
> >>       
> >>           iptables -t "$table" -P "$REPLY" ACCEPT
> >>       
> >>       done
> >>       iptables -t "$table" -F
> >>       iptables -t "$table" -X
> >> 
> >> done
> > 
> > I do not understand the purpose of $REPLY in that script.
> 
> It will contain the name of the chain to be passed to iptables -P.

Hm, interesting.  This is some magic facility of bash that I've never come 
across.  I would have expected to see the variable REPLY being assigned to 
somewhere or other...

On the other hand, a review of the bash man page tells me that this is what 
'read' does if you don't tell it what to read into.  Heh :)


Antony.

-- 
One tequila, two tequila, three tequila, floor.

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to