[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: confused by m4 esyscmd expansion ... how to 'escape' nested quotes?
From: |
OpenMacNews |
Subject: |
Re: confused by m4 esyscmd expansion ... how to 'escape' nested quotes? |
Date: |
Fri, 05 Aug 2005 07:52:24 -0700 |
hi stepan,
thx 4 the reply! =)
To conclude, I suggest:
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}"'))
this suggestion now correctly expands to the IP, without the error i'd
mentioned,
BUT, it throws-in an unwanted <CR> after the expansion ... which, per:
<http://developer.apple.com/documentation/DeveloperTools/m4/m4_12.html>
is apparently NOT unexpected ...
"Note how the expansion of esyscmd has a trailing newline."
Is there a way to NOT include the newline?
also, i have no problem using/defining:
changequote([,])
which, upon changing your suggestion to:
changequote([,])
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}']))
also works nicely -- even with the awk single-quote now.
thx again!
cheers,
richard
- confused by m4 esyscmd expansion ... how to 'escape' nested quotes?, OpenMacNews, 2005/08/05
- Re: confused by m4 esyscmd expansion ... how to 'escape' nested quotes?, Stepan Kasal, 2005/08/05
- Re: confused by m4 esyscmd expansion ... how to 'escape' nested quotes?,
OpenMacNews <=
- Re: confused by m4 esyscmd expansion ... how to 'escape' nested quotes?, Stepan Kasal, 2005/08/05
- Re: confused by m4 esyscmd expansion ... how to 'escape' nested quotes?, OpenMacNews, 2005/08/05
- Re: confused by m4 esyscmd expansion ... how to 'escape' nested quotes?, Stepan Kasal, 2005/08/06
- Re: confused by m4 esyscmd expansion ... how to 'escape' nested quotes?, OpenMacNews, 2005/08/06
- Re: confused by m4 esyscmd expansion ... how to 'escape' nested quotes?, Stepan Kasal, 2005/08/07
- Re: confused by m4 esyscmd expansion ... how to 'escape' nested quotes?, OpenMacNews, 2005/08/07