[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can m4 have a option that ignore the shebang line?

From: Gary V. Vaughan
Subject: Re: Can m4 have a option that ignore the shebang line?
Date: Thu, 15 Dec 2005 13:38:57 +0000
User-agent: Mozilla Thunderbird 1.0 (X11/20050305)

[Cc:ing m4-discuss]

Yiyi Hu wrote:
Sorry to disturb you.

No problem.  Please post such questions to the list in future
though, where they may serve future users.

I ever wish to try to make a .m4 file into a cgi,
But the problem is,
If you chmod the .m4 file into executable,
It will print the shebang-line

address@hidden:~/tmp$ cat asdf.m4
define(`foo', ``foo' here')dnl
address@hidden:~/tmp$ ./asdf.m4
foo here

the example above will display the #!/usr/bin/m4
I know a wrapper can filter the first line,
But Is it possible to do it in m4 directly?

Actually, no there is no straight forward way to do it in m4 right
now.  It *is* a good idea though, and I will add it to M4-2.0.

In the mean while, I would write:

$ cat aoeu.m4

exec m4 <<'EOF'
define(`foo', ```foo' here'')dnl
exit 1
$ ./aoeu.m4
`foo' here

Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]