home *** CD-ROM | disk | FTP | other *** search
- /*=======================================================*/
- /* */
- /* Execute cli commands from within PowerVisor V1.0 */
- /* */
- /* ⌐ Jorrit Tyberghein 17 Sep 1991 */
- /* */
- /*=======================================================*/
-
- options results
-
- 'string rc'
- cmd=result
-
- ti=pragma('Id')
-
- address command cmd '>t:cmd'ti
- if rc~=0 then
- do
- 'print "Command failed with returncode' rc '!\0a"'
- address command 'delete t:cmd'ti' >nil:'
- exit
- end
- if ~open(file,'t:cmd'ti,'R') then
- do
- address command 'delete t:cmd'ti' >nil:'
- 'print "Error opening file !\0a"'
- exit
- end
-
- line=readln(file)
- do while ~eof(file)
- 'print "╖┼'line'┼\0a"'
- line=readln(file)
- end
-
- call close file
- address command 'delete t:cmd'ti' >nil:'
- exit
-