如何在mac上运行REXX文件?

问题描述:

我正在学习如何使用REXX编程语言,但我在这样做时遇到了一些困难。首先,我使用的是macbook pro。其次,我从sourceforge下载了解释器,但不知怎的,我无法管理它的工作,没有我可以运行的dmg文件。如果有人提供了解决方案,我会很高兴。 我试图通过终端运行rexx文件,但之后,我得到一个错误 - 访问被拒绝或命令未找到。如何在mac上运行REXX文件?

P*******-MacBook-Pro:Desktop P******$ animal.rexx 
    -bash: animal.rexx: command not found 
+1

为了安装里贾纳的Rexx解释器,你将需要使用tar命令。文档在命令提示符下可用。打开终端并输入“man tar”,不带引号并返回。 – cschneid

+0

对于UNIX/Linux及其同类,任何可用的REXX发行版都没有OS X特定的安装包。但是,因为OS X实质上是UNIX,所以可以使用build-from-source路径来安装它们。正如上面暗示的@cshneid,你将不得不通过终端使用命令。我建议你谷歌找到那些已经做到这一点的人的经验。两个REXX项目都有活跃的用户群体;链接可以在各自的主页上找到,也可以通过谷歌找到。 – zarchasmpgmr

我明白你的失望。我努力在我的Mac上安装oorexx。

下载:http://www.oorexx.org/download.html

阅读:http://rexxla.org/events/2007/presentations/renej2.pdf

我最近刚刚在我的Mac安装ooRexx通过上述PDF去后。您确实需要特别执行以下操作:

  1. 在上面的SourceForge链接上运行.dmg安装程序。这将放置在/ usr/bin中
  2. 运行从上面的PDF链接下面的脚本通过 “须藤的/ usr/bin中/ REXX” 创建符号处理:

    "cd /opt/ooRexx/lib/ooRexx" 
    "ls | rxqueue" 
    do queued() 
        parse pull line 
        do i=1 to line~words() 
        say "sudoln-s/opt/ooRexx/lib/ooRexx/"line~word(i)"/usr/lib/"line~word(i) 
        end 
    end 
    "cd /opt/ooRexx/bin" 
    "ls | rxqueue" 
    do queued() 
        parse pull line 
        do i=1 to line~words() 
        say "sudo ln -s /opt/ooRexx/bin/"line~word(i) "/usr/bin/"line~word(i) 
        end 
    end 
    
  3. 给许可/选择/和/ opt/ooRexx

    sudo chmod 755 /opt/ooRexx 
    sudo chmod 755 /opt/ooRexx 
    
  4. 添加到/系统/库/ Automator的/运行shell Script.action/ 内容/资源/ Shells.plist

    <key>/usr/bin/rexx</key> 
    <dict> 
    <key>args</key> 
    <array> 
        <string>-e</string> 
        <string>%</string> 
        <string>--</string> 
    </array> 
    <key>script</key> 
    <array> 
        <string>do while lines()&#10;say linein()&#10;end</string> 
        <string>parse arg arg1 arg2 arg3</string> 
    </array>