Contents | Prev | Next

5.3.1 Using the header utility

NOTE: The command-line and IDE compilers can put #! headers into the generated executables so using the Irie Header Utility is not necessary anymore unless you can't or don't want to recompile the executable.

The Irie Header Utility is used to create IVM executables with #! headers. #! headers can be used by UNIX or UNIX-like operating systems (such as Solaris, Linux or FreeBSD) to locate the interpreters that should be used to execute scripts. When UNIX or a UNIX-like operating system attempts to execute a file and the first two characters in the file are #!, the operating system will assume that the file is a script that needs to be interpreted, and it will expect the location of the interpreter to follow the #!.

The syntax is:

 ivm header input-executable output-executable [location]

where

So for example if the interpreter was installed in /usr/local/bin, you would store #!/usr/local/bin/ivm in front of the executable.

So for example if you had an IVM executable named hello.ivm you could enter

 ivm header hello.ivm hello /usr/local/bin/ivm

which creates a new executable called hello which has

 #!/usr/local/bin/ivm

in front (#! is automatically inserted). In order to be able to execute hello you also need to set the executable permission bit (using

 chmod a+x hello

for example).

Contents | Prev | Next