⎕CMD Enhancement

General discussions on potential enhancements to the APL+Win system.

⎕CMD Enhancement

Postby Ajay Askoolum » May 5th, 2019, 2:34 am

Code: Select all
Result:
The explicit result; always 0 0⍴''
It would be very useful if this function were enhanced such that it returns the results, if any, of the command. Some handy examples:
Code: Select all
      fsutil fsinfo drives                                 ⍝ enumerates drives on the local computer
      systeminfo ∣ findstr /B /C:"OS Name" /C:"OS Version" ⍝ Get Windows version
This could be accomplished using a new left-hand argument.
⎕lib is returning results to the workspace - beneath the covers, it is probably command dir.
Ajay Askoolum
 
Posts: 885
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom

Re: ⎕CMD Enhancement

Postby OldOne » February 8th, 2020, 10:16 pm

I have written a set of functions that enhances quad-cmd to return both results and any errors that occur. It also gets around the normal Quad-cmd length issue. I am new here, but a long time with APL. I am not sure how to upload the function(s). But I can try if you would like a copy.
Old One - J Steven Hansen, PhD
Scientist and Engineer
OldOne
 
Posts: 5
Joined: January 9th, 2020, 9:22 pm

Re: ⎕CMD Enhancement

Postby Davin Church » February 8th, 2020, 10:24 pm

Does it work only on a single (non-batchfile) program execution line? I would presume that you rerouted stdout and stderr to temp files?
Davin Church
 
Posts: 657
Joined: February 24th, 2007, 1:46 am

Re: ⎕CMD Enhancement

Postby OldOne » February 8th, 2020, 10:35 pm

Hi again. I have uploaded a copy of my function that returns a result. It is in the user upload forum.
Old One - J Steven Hansen, PhD
Scientist and Engineer
OldOne
 
Posts: 5
Joined: January 9th, 2020, 9:22 pm

Re: ⎕CMD Enhancement

Postby Ajay Askoolum » April 6th, 2020, 4:13 pm

Thank you; does what I asked for.
Ajay Askoolum
 
Posts: 885
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom


Return to APL+Win Wish-List

Who is online

Users browsing this forum: No registered users and 1 guest

cron