Re: where are STDERR and STDOUT of perl do "/path/to/script.pl"
Montaseri <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
what is "perl do" ....you seem to be on Unix (from the path) Just say perl /path/to/script.pl 2>&1 /tmp/myLogFile Let me know Medi On Thu, May 27, 2010 at 3:18 PM, Joao Ferreira gmail < [email protected]> wrote: > tried this: > > perl do "/path/to/script.pl >>/tmp/myLogFile 2>&1" > > but it did not work... > > Joao > > > On Thu, 2010-05-27 at 13:44 -0700, Montaseri wrote: > > At least on Unix, you can easily redirect both STDOUT and STDERR by > > saying > > > > script 1> /tmp/stdout.txt 2> /tmp/stderr.txt > > > > or send both to the same file with > > > > script 2>&1 /tmp/both.txt # reads , send stderr to where > > stdout goes > > > > Cheers > > Medi > > > > On Thu, May 27, 2010 at 12:38 PM, Joao Ferreira gmail > > <[email protected]> wrote: > > Hello all, > > > > I'm using the > > > > perl do "/path/to/script.pl" to fire-up a sub-agent... > > > > Where can I find the STDOUT and STDERR of my script ? can I > > redirect > > them some how ? > > > > Or, alternatively, what would be the recommended approach for > > logging > > (instead of printing) from within the perl script ? > > > > Even so, STDERR is quite important during dev... where is it ? > > > > Thanks > > Joao > > > > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > Net-snmp-users mailing list > > [email protected] > > Please see the following page to unsubscribe or change other > > options: > > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Net-snmp-users mailing list > [email protected] > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > ------------------------------------------------------------------------------ _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users