Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm intrigued, could you give a small example please?


Not right now, unfortunately; my computer is at the office and I don’t use m4 enough to give an example from memory. I’ll try to remember next time I go in.


I imagine it's something like this?

  $ m4 << EOF
  changequote(],[)dnl
  define(foo,bar)dnl
  ]Lorem ipsum

  foo
  [foo]

  Lorem ipsum[
  EOF
  Lorem ipsum

  foo
  bar

  Lorem ipsum


That looks about right; I’m usually outputting formats that don’t care about blank lines and so skip the “dnl”s and put the start and end quotes on their own lines for readability.


Heh. Never seen that before. I'll have to have a play. Thanks both.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: