How to capture shell command output
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 404 from 2014/6/11
    From: Germany
    Hi.

    Is is possible in Arexx to capture the shell output of a command?
    Assume this command:
    Code:
    ADDRESS COMMAND "list sys:"

    Can the output of this be captured into a variable?


    Manfred
  • »26.01.16 - 19:21
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    defender
    Posts: 248 from 2011/4/24
    Maybe this helps you:
    list sys: >Ram:list.txt

    only if I understod what you want.
    you list of sys is recorded as list.txt in Ram:

    But its more amiga dos then arexx I think.
    PowerMac 3.6 - Radeon 9000_64Mb - 1,5Gb Ram - SB Live - MorphOS 3.9
    CD32 TF330 SILP Wifi- PowerBook 1,67GHz 1GB/100GB - MorphOS 3 reg. 1455 IMac Isight
  • »26.01.16 - 20:46
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 404 from 2014/6/11
    From: Germany
    Well, it probably works.
    I could read the file in Arexx after the command execution comes back.
    It's a bit a detour but nevertheless.


    Manfred
  • »26.01.16 - 21:27
    Profile
  • fx
  • Caterpillar
    Caterpillar
    fx
    Posts: 25 from 2010/10/12
    I think you could use pipe: to not have to write to a file
  • »26.01.16 - 22:04
    Profile Visit Website