in reply to Re^3: how i capture a script error to a file ?
in thread how i capture a script error to a file ?



ok, but i do it on script ? without using > stderr on bash

  • Comment on Re^4: how i capture a script error to a file ?

Replies are listed 'Best First'.
Re^5: how i capture a script error to a file ?
by shmem (Chancellor) on Apr 27, 2017 at 13:53 UTC
    ok, but i do it on script ?

    What environment does "on script" connote? The program in question is invoked by "some something", and that "some something"'s STDERR must be redirected to the error log. The notation I gave is for bash (and sh, korn shell, zsh and others). Check the documentation of that "some something" about how to redirect its STDERR.

    If that "some something" is another instance of perl, see open about how to redirect STDERR. You might want to localize that redirection.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'