Hi,

On Tue, Jan 28, 2020 at 09:23:52AM +0100, Ralf Hildebrandt wrote:
> > At the top of the script
> > 
> > exec >>/tmp/myout.txt 2>&1
> 
> Oy, that's easy. You're the best. Uhm, and iff the script is in Perl?

Wrap it in shell? :-)

In Perl it's not as compact, but IIRC you can just reopen STDOUT and STDERR,
as in

  open STDOUT, ">>/tmp/mylog.out";
  open STDERR, ">&STDOUT";

https://www.perl.com/article/45/2013/10/27/How-to-redirect-and-restore-STDOUT/
https://www.itworld.com/article/2816641/redirecting-standard-error-in-perl.html

gert

-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             g...@greenie.muc.de

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to