hints on shell string expansion ?
Pawel Jakub Dawidek
P.Dawidek at prioris.mini.pw.edu.pl
Mon Jul 7 01:32:00 PDT 2003
On Mon, Jul 07, 2003 at 12:46:26AM -0700, Luigi Rizzo wrote:
+> I am writing a script to generate ipfw test cases, and as
+> part of the script i need to generate 'actions' which can be either
+> one or more, e.g.
+> actions="allow 'deny log' 'pipe 10'"
+> for act in $actions ; do
+> echo "add $act ip from 188.8.131.52 to 184.108.40.206"
+> I have tried to play tricks with quotes and backquotes, backslashes,
+> eval, etc. but no methods helped. Any ideas ?
actions="allow#deny log#pipe 10"
for act in $actions; do
echo "add $act ip from 220.127.116.11 to 18.104.22.168"
Pawel Jakub Dawidek pawel at dawidek.net
UNIX Systems Programmer/Administrator http://garage.freebsd.pl
Am I Evil? Yes, I Am! http://cerber.sourceforge.net
More information about the freebsd-hackers