Skip to main content

redirecting script variable to log file without loosinglosing stderr

whenWhen setting "set -x" inside bash script, or if you run your script with bash -xbash -x, you will get all the arguments printed to the screen together with the stdout.

isIs it possible to have stderr and stdout printed to screen but redirecting the set -xset -x output to the log file without having it printed to the screen?

theThe idea is to have all the info iI can get inside the log, but only print regular stdout and stderr to the screen.

redirecting script variable to log file without loosing stderr

when setting "set -x" inside bash script or if you run your script with bash -x you will get all the arguments printed to the screen together with the stdout.

is it possible to have stderr and stdout printed to screen but redirecting the set -x output to the log file without having it printed to the screen?

the idea is to have all the info i can get inside the log but only print regular stdout and stderr to screen.

redirecting script variable to log file without losing stderr

When setting "set -x" inside bash script, or if you run your script with bash -x, you will get all the arguments printed to the screen together with the stdout.

Is it possible to have stderr and stdout printed to screen but redirecting the set -x output to the log file without having it printed to the screen?

The idea is to have all the info I can get inside the log, but only print regular stdout and stderr to the screen.

Source Link
Asaf Magen
  • 547
  • 1
  • 10
  • 21

redirecting script variable to log file without loosing stderr

when setting "set -x" inside bash script or if you run your script with bash -x you will get all the arguments printed to the screen together with the stdout.

is it possible to have stderr and stdout printed to screen but redirecting the set -x output to the log file without having it printed to the screen?

the idea is to have all the info i can get inside the log but only print regular stdout and stderr to screen.