On Wed, Jun 12, 2024 at 07:31:13PM +0200, Angelo Borsotti wrote: > "set -x" makes the ensuing commands be printed, but prefixed > with "+ ", which makes the result look ugly, not to mention that > the following "set +x" is echoed too (there are hacks to suppress > the "set +x" output, but they are just hacks).
If all you want is to remove the "+ ", you can simply set the PS4 variable to an empty string. > set -o log > cat tmp >tmp1 # or any other command > set -o nolog > > producing the output on the console > > cat tmp >tmp1 If you want to retain redirections in the -x output, that's a whole different issue. There is currently no way to do that. Chet would have to implement something.