I installed m4 from this site:http://www.geeksww.com/tutorials/libraries/m4/installation/installing_m4_macro_processor_ubuntu_linux.php
So far so good. The package also had some examples in it. If I try to run the examples, it just brings me some errors etc.
Now, I'm really a noob with ubuntu (and linux generally).
I tried to run the program like this:
...m4/m4-1.4.10/examples# ./exp.m4
./exp.m4: line 1: syntax error near unexpected token ``countdown', `$1'
./exp.m4: line 1: `define(`countdown', `$1 ifelse(eval($1 > 0), 1, `countdown(decr($1))', `Done')')'
Now, I guess the ./
is the absolutely wrong one, meaning that I have to do it somehow else. Any help from you?
You run an m4 "program" like this:
$ m4 exp.m4 > exp.out
Note that m4 reads from stdin unless you supply a file name on the command line, and it writes to stdout.