AIPS HELP file for SYSTEM in 31DEC21
As of Thu Dec 2 18:18:58 2021
SYSTEM: Verb to send a command to the operating system
SYSCOM Command to send
SYS2COM Additional parts of command
SYSOUT Where output goes
ERROR @ Error occurred
Use: SYSTEM sends a command to the operating system. The command and
the output "device" are character strings up to 72 characters
in length. They may contain lower case letters - remember to
type them in as the last command in the input line and to omit
the close quote ('). The POPS error code is not set; the ERROR
adverb is set instead so that a procedure may test this.
The command the system sees is
SYSCOM !! SYS2COM >> SYSOUT
so it is not needed to direct an output in SYSCOM unless one
wants to overwrite rather than append. Each of the 8 strings in
the string array SYS2COM are appended to SYSCOM. All trailing
blanks are removed. If you want a blank between portions of the
command you must put it as a leading blank in the SYS2COM(i).
SYSCOM = 'cat
SYS2 = ' '
SYS2(1) = ' AAA.FOR '
SYS2(2) = ' fff.txt
SYS2(7) = ' Zzz'
SYS2(8) = '.c
SYSOUT = '$HOME/fils.cat
'cat AAA.FOR fff.txt Zzz.c >> $Home/fils.cat'
and is sent to the operating system.
Note that, if SYSCOM !! SYS2COM contains the string ' >', then
the ' >> ' !! SYSOUT is omitted.
It appears that aliases are not known - at least in bash shells
- but environment variables are known. The command may require
you to enter response(s) since control is not returned to AIPS
until the command is finished. You can even run another aips
with this command!
SYSCOM.....The desired system command - no default.
SYS2COM....Eight more 64-character strings appended to SYSCOM with a
blank separator. Trailing blanks are ignored.
SYSOUT.....Output device for the command: default is /dev/tty which
is your terminal window.
ERROR......Output adverb: > 0 => error occurred, -1 => no error.