Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,39 +0,0 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
with Ada.Characters.Latin_1; use Ada.Characters.Latin_1;
|
||||
with GNAT.Expect; use GNAT.Expect;
|
||||
with GNAT.OS_Lib; use GNAT.OS_Lib;
|
||||
with GNAT.String_Split; use GNAT.String_Split;
|
||||
|
||||
procedure System_Command is
|
||||
Command : String := "ls -l";
|
||||
Args : Argument_List_Access;
|
||||
Status : aliased Integer;
|
||||
Separators : constant String := LF & CR;
|
||||
Reply_List : Slice_Set;
|
||||
|
||||
begin
|
||||
Args := Argument_String_To_List (Command);
|
||||
-- execute the system command and get the output in a single string
|
||||
declare
|
||||
Response : String :=
|
||||
Get_Command_Output
|
||||
(Command => Args (Args'First).all,
|
||||
Arguments => Args (Args'First + 1 .. Args'Last),
|
||||
Input => "",
|
||||
Status => Status'Access);
|
||||
begin
|
||||
Free (Args);
|
||||
-- split the output in a slice for easier manipulation
|
||||
if Status = 0 then
|
||||
Create (S => Reply_List,
|
||||
From => Response,
|
||||
Separators => Separators,
|
||||
Mode => Multiple);
|
||||
end if;
|
||||
end;
|
||||
-- do something with the system output. Just print it out
|
||||
for I in 1 .. Slice_Count (Reply_List) loop
|
||||
Put_Line (Slice (Reply_List, I));
|
||||
end loop;
|
||||
|
||||
end System_Command;
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
[string[]]$volume = cmd /c vol
|
||||
|
||||
$volume
|
||||
|
|
@ -1,11 +1,16 @@
|
|||
/*REXX program executes a system command and displays the results (from an array). */
|
||||
parse arg xxxCmd /*obtain the (system) command from CL.*/
|
||||
trace off /*suppress REXX error msgs for fails. */
|
||||
@.= 0 /*assign default in case ADDRESS fails.*/
|
||||
address system xxxCmd with output stem @. /*issue/execute the command and parms. */
|
||||
if rc\==0 then say copies('─', 40) ' return code ' rc " from: " xxxCmd
|
||||
/* [↑] display if an error occurred.*/
|
||||
do #=1 for @.0 /*display the output from the command. */
|
||||
say strip(@.#, 'T') /*display one line at a time──►terminal*/
|
||||
end /*#*/ /* [↑] displays all the output. */
|
||||
exit 0 /*stick a fork in it, we're all done. */
|
||||
-- 12 Sep 2025
|
||||
include Setting
|
||||
|
||||
say 'GET SYSTEM COMMAND OUTPUT'
|
||||
say version '(Windows)'
|
||||
say
|
||||
command='dir "c:\program files\oorexx\*.cls"'; stem.=0
|
||||
address system command with output stem stem.
|
||||
say 'Output from system command' command'...'
|
||||
say
|
||||
do i = 1 to stem.0
|
||||
say stem.i
|
||||
end
|
||||
exit
|
||||
|
||||
include Abend
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
For Each line In ExecCmd("ipconfig /all")
|
||||
Wscript.Echo line
|
||||
Next
|
||||
|
||||
'Execute the given command and return the output in a text array.
|
||||
Function ExecCmd(cmd)
|
||||
|
||||
'Execute the command
|
||||
Dim wso : Set wso = CreateObject("Wscript.Shell")
|
||||
Dim exec : Set exec = wso.Exec(cmd)
|
||||
Dim res : res = ""
|
||||
|
||||
'Read all result text from standard output
|
||||
Do
|
||||
res = res & VbLf & exec.StdOut.ReadLine
|
||||
Loop Until exec.StdOut.AtEndOfStream
|
||||
|
||||
'Return as a text array
|
||||
ExecCmd = Split(Mid(res,2),vbLf)
|
||||
End Function
|
||||
Loading…
Add table
Add a link
Reference in a new issue