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 18.104.22.168 to 22.214.171.124"
+> 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 126.96.36.199 to 188.8.131.52"
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