Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: how can I redirect the output of a program and get the exit code too?

by EvdB (Deacon)
on Jun 22, 2004 at 11:15 UTC ( #368677=note: print w/ replies, xml ) Need Help??


in reply to how can I redirect the output of a program and get the exit code too?

If you are after the exit code then I am assuming that the redirection you have in mind is on the terminal. This is not really a perl thing and dependent on your shell. Try typing help and going from there. Below are a few pointers for bash on linux though:

$ perl buggy_code.pl > /dev/null # Send all nonwarnings to bit bin $ perl buggy_code.pl 2> errors.txt # send errors to a file

--tidiness is the memory loss of environmental mnemonics


Comment on Re: how can I redirect the output of a program and get the exit code too?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-12-27 06:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls