hints on shell string expansion ?
Nicolas Rachinsky
list at rachinsky.de
Mon Jul 7 00:56:42 PDT 2003
* Luigi Rizzo <rizzo at icir.org> [2003-07-07 00:46 -0700]:
> but i because the string of actions is used in several places,
> I would love to find a way to group actions into a single
> variable and then write something like this
>
> actions="allow 'deny log' 'pipe 10'"
> for act in $actions ; do
> echo "add $act ip from 1.2.3.4 to 5.6.7.8"
> done
actions="allow 'deny log' 'pipe 10'"
eval "for act in $actions ; do"'
echo "add $act ip from 1.2.3.4 to 5.6.7.8"
done'
But I'm shure there are better ways.
Nicolas
More information about the freebsd-hackers
mailing list