Page 1 of 1

⎕CMD Enhancement

PostPosted: May 5th, 2019, 2:34 am
by Ajay Askoolum
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.

Re: ⎕CMD Enhancement

PostPosted: February 8th, 2020, 10:16 pm
by OldOne
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.

Re: ⎕CMD Enhancement

PostPosted: February 8th, 2020, 10:24 pm
by Davin Church
Does it work only on a single (non-batchfile) program execution line? I would presume that you rerouted stdout and stderr to temp files?

Re: ⎕CMD Enhancement

PostPosted: February 8th, 2020, 10:35 pm
by OldOne
Hi again. I have uploaded a copy of my function that returns a result. It is in the user upload forum.

Re: ⎕CMD Enhancement

PostPosted: April 6th, 2020, 4:13 pm
by Ajay Askoolum
Thank you; does what I asked for.