Return code -1 executing command on Linux

  • I am seeing odd behavior executing a command string under linux. I have used this for years using Regina Rexx on Solaris, but this construct doesn't appear to work on ooRexx 3.1.1 on Linux. (Haven't had a chance to try 3.2.0 yet).

    The problem seems to be related to the fact that I actually have 2 commands being executed in the same command line, separated by a semicolon. I'm relatively new to Linux, so I'm not sure what the significant difference is here. I am using a similar setup on Linux that I did on Solaris.

    Thanks for any help...

    Steve Johnson

    stevej:1> cat cdexec


    Trace ?i

    'cd /users/stevej; ls -l 1'
    stevej:2> cdexec
    +++ "LINUX COMMAND /users/stevej/rexx/cdexec"
    5 - 'cd /users/stevej; ls -l 1'
    >L> "cd /users/stevej; ls -l 1"
    >>> "cd /users/stevej; ls -l 1"
    +++ "RC(-1)"
    +++ Interactive trace. "Trace Off" to end debug, ENTER to Continue. +++


    • Perry Werneck
      Perry Werneck


      It doesn't seem like a rexx problem. What's the result of the same line when typed directly in the console? Is the file/folder "/users/stevej/1" availabe?

      • William

        -bash-3.2$ rexxtry
        REXX-ooRexx_3.2.0(MT) 6.02 12 Jan 2008
        rexxtry lets you interactively try REXX statements.
        Each string is executed when you hit Enter.
        Enter 'call tell' for a description of the features.
        Go on - try a few... Enter 'exit' to end.
        Aint_We_Cute.eml -draw Music
        %backup%~ 'eth0: MUW.motd
        bin flouresence_mask.png My_Life
        bunny_1.wav flouresence.mvg nautilus-debug-log.txt
        Desktop flouresence_overlay.png papi-1.0_beta-x86.rpm
        Desktop.base FreshFlower_mask.png Pictures
        Desktop.jpg FreshFlower.mvg Public
        Desktop.mvg FreshFlower_overlay.png Templates
        Documents Log Videos
        Download M WEB
        rc = 0 ............................................ rexxtry on LINUX

        You need to use the single quote to tell rexx to pase this string to linux.
        Then use the '(' and ')' to tell linux this is a complex command.

    • Hi... here's the result directly from the command line...

      stevej:101> cd /users/stevej/; ls -l 1
      -rw-r--r-- 1 stevej eng 90547 Feb 29 16:49 1

      Could this have something to do with the default shell being used by the rexx interpreter? I use tcsh, what does rexx use?

      Thanks Steve