hi all,
i'm attempting to use m4 to expand/define my machine's IP address for use in
apache's httpd.conf.
the cmd string:
% dig @my.ns.domain.com machine.domain.com | grep machine.domain.com | grep -v
DiG | grep -v ";"machine.domain.com | awk '{print $5}'
works fine @ shell to pick out the IP address for machine.domain.com.
in httpd.conf.m4, i'd then hope to add:
...
define(`MY_IP_ADDR', `esyscmd(dig @my.ns.domain.com machine.domain.com | grep
machine.domain.com | grep -v DiG | grep -v ";"machine.domain.com | awk '{print
$5}')')
...
<VirtualHost MY_IP_ADDR:80>
...
which, after:
% m4 httpd.conf.m4 > httpd.conf
would expand to, in httpd.conf, e.g.:
...
<VirtualHost 10.0.0.6:80>
...
unfortunately, processing the above results in a processing error of:
NONE:0: m4: ERROR: EOF in argument list
which seems to be a result of improper escaping of the single- and
double-quotes at the end of the m4 define, i.e.:
... ... ";"machine.domain.com | awk '{print $5}')')
^ ^ ^
QUESTION: how would i properly define/escape the esyscmd(arg)? i keep staring
at the silly thing and am in 'quote catch-22' 8-}
thx,
richard
_______________________________________________
M4-discuss mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/m4-discuss