REXX File Association

Howdy,

I have finished installing a REXX interpreter and wonder if there is a way I can associate the extension ".rex" with the REXX program? Basically, instead of having to type rexx pgmtest.rex I want to be able to just type pgmtest.rex.
 
That only works on Windows. Unix systems are completely unaware of the three letter extensions.

Typically unix uses the first line to indicate which interpreter to use. For example:
Code:
#!/bin/sh
Or
Code:
#!/usr/bin/perl

In your case it's probably something like this:
Code:
#!/usr/local/bin/rexx


http://en.wikipedia.org/wiki/Shebang_(Unix)
 
Interesting, will give that a try later today. I thought the shebang was limited to shell scripts, thanks for the wiki pointer.
 
That will work only if the interpreter supports hash comments and REXX does not support them so you will end up with a syntax error.
 
I tested it out last night and it worked like a charm! After more searching, I found a PDF from the University of Denver and on page 5 it references the Shebang on the first line of the REXX program. Now this also specifies the Regina REXX interpreter. I do not know if this would work with other REXX interpreters (like Open Object REXX) as I have Regina REXX installed.
 
Could be, I just know that the ANSI REXX (96) does not support hash comments and only uses C style comment syntax.
 
kpa said:
Anyone remember the REXX implementation on Commodore Amigas called AREXX?
That's the only reason why I know something like REXX exists ;)

Never did much with it though. But I remember it being quite powerful.
 
Back
Top