Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^7: exec()ed process dont write to std(?:err|out) (system)

by bbfu (Curate)
on Apr 13, 2004 at 19:06 UTC ( #344826=note: print w/ replies, xml ) Need Help??

in reply to Re^6: exec()ed process dont write to std(?:err|out) (system)
in thread exec()ed process dont write to std(?:err|out)

I couldn't (and still can't) see how I can use a single wrapper with multiple scripts this way.

Something like this, maybe?

@echo off REM REM nperl.bat REM REM Assumes %1 holds perl script copy /Y C:\Perl\bin\perl.exe %1.exe > NUL %1.exe %* del /Y %1.exe > NUL

Put it in your path, and call it as: nperl args

I tried to figure out a way to avoid hard-coding the path to the perl executable, but Windows batch files are pretty limited and I couldn't come up with one.

Update: This might not work on earlier versions of Windows (ie, pre-2k? non-NT based?), as they don't support the %* construct. (At least, I don't think they do.)

Black flowers blossom
Fearless on my breath

Comment on Re^7: exec()ed process dont write to std(?:err|out) (system)
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://344826]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2015-11-29 09:22 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (750 votes), past polls