bash xtrace capture

bash xtrace capture

Post by Grahamcat » Tue, 30 Sep 2003 22:08:45



Hi,

Trying to redirect the xtrace print on the stdout to a file. But have failed
... any suggestions ?

 
 
 

bash xtrace capture

Post by Stephane CHAZELA » Tue, 30 Sep 2003 22:26:47



> Trying to redirect the xtrace print on the stdout to a file. But have failed
> ... any suggestions ?

xtrace output is written on stderr. The problem is that if you
redirect stderr to a file, you'll get both xtrace and normal
error messages.

$ bash -x -c 'ls /etc/passwd /FOO' 2> /tmp/x
/etc/passwd
$ cat /tmp/x
+ ls /etc/passwd /FOO
ls: /FOO: Aucun fichier ou rpertoire de ce type

--
Stphane

 
 
 

1. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

Is there a proper fixed bash on any of the FTP sites out there?

I know there bash is on the usual sites but I don't know if they are
bugged or not :(

Regards,

Neil.

--


------------------------------------| Edinburgh, EH14 2DE, United Kingdom
**Domino: There`s nothing you can do when you`re the next in line: Domino**

2. uncatenating a file

3. Korn shell "cascading" xtrace?

4. Bind recursive queries and iptables firewall

5. How to capture a command's return code in Bash?

6. highpoint ide-raid

7. How do I capture stderr in a bash shell variable?

8. System Administration/Policies in a Computer Science Department

9. Bashing bash (Was Re: bash or user error with set -e and subshells)

10. Bash calls TCL, TCL calls Bash, 2nd Bash never reads input

11. mpeg capture from video capture card

12. Capture mpeg from video capture card.

13. Bash/CGI - - HTML call to Bash script