Search                        Top                                  Index
HELP READIN_SHELL_OUTPUT                          Aaron Sloman, Feb 1999

readin_shell_output(command, shell) -> list;

This runs a unix shell command in a specified shell, and makes a list of
strings representing the output of the command. The command should be
non-interactive, and should terminate.

The arguments:
    command
        is a string containing a unix command, e.g.
        'uname -rv'
        'who'
        'ls -lt'

    shell
        is false or a string representing the shell to use, e.g.
        '/bin/sh'
        '/bin/csh'
            The later interprets "~"

        If it is false, the current value of $SHELL is used

The output, list, is a list of strings.

Examples

    readin_shell_output('uname -rv', '/bin/sh')=>;
    readin_shell_output('who', '/bin/sh')==>;

Better format:
    applist(readin_shell_output('who', '/bin/sh'), npr);

(See HELP applist, HELP npr)


For full details
    SHOWLIB * READIN_SHELL_OUTPUT

See also
    HELP * PIPEUTILS
    HELP * RUN_UNIX_PROGRAM

    REF * SYSUTIL
    REF * SYSIO

    LIB * RUN_UNIX_PROGRAM
    LIB * PIPEIN
    LIB * SYS_OBEY_LINEREP
    LIB * SYS_POPEN



--- $poplocal/local/help/readin_shell_output
--- Copyright University of Birmingham 1999. All rights reserved. ------