# REXX File Association



## Wrexxman (Jun 25, 2013)

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`.


----------



## SirDice (Jun 25, 2013)

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:

```
#!/bin/sh
```
Or 

```
#!/usr/bin/perl
```

In your case it's probably something like this:

```
#!/usr/local/bin/rexx
```


http://en.wikipedia.org/wiki/Shebang_(Unix)


----------



## Wrexxman (Jun 25, 2013)

Interesting, will give that a try later today.  I thought the shebang was limited to shell scripts, thanks for the wiki pointer.


----------



## expl (Jun 25, 2013)

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.


----------



## Wrexxman (Jun 26, 2013)

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.


----------



## expl (Jun 26, 2013)

Could be, I just know that the ANSI REXX (96) does not support hash comments and only uses C style comment syntax.


----------



## kpa (Jun 26, 2013)

Anyone remember the REXX implementation on Commodore Amigas called AREXX?


----------



## wblock@ (Jun 26, 2013)

kpa said:
			
		

> Anyone remember the REXX implementation on Commodore Amigas called AREXX?



Yes.  Well, dimly.


----------



## Wrexxman (Jun 26, 2013)

My question has been answered.  Moderators can mark this [Solved].  Thanks to everyone.


----------



## SirDice (Jun 26, 2013)

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.


----------

