outputting set -x to file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers outputting set -x to file
# 1  
Old 05-05-2011
outputting set -x to file

I need to enable
Code:
set -x

in my croned script as at times the script is not returning all data that it should be. This only happens intermittently and as such I would like a means of being able to check what goes wrong.
My question is how to output the debug of
Code:
set -x

to file?
# 2  
Old 05-05-2011
use
2>something

Code:
00 12 * * 1-5 /whatever_path/yourfile >/tmp/yourfilelog 2>/tmp/yourfile.err

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Outputting data from log file to report

I have a log file that looks like this. the lines are grouped. 2 lines per entry. M: 2019-01-25 13:02:31.698 P25, received network transmission from KI4EKI to TG 10282 M: 2019-01-25 13:02:35.694 P25, network end of transmission, 4.3 seconds, 1% packet loss M: 2019-01-25 13:02:38.893 P25,... (7 Replies)
Discussion started by: ae4ml
7 Replies

2. Shell Programming and Scripting

Outputting Errors to a Log file

Good Morning, Every so often, I have copy scripts that to don't complete, but I don't immediately know why. It usually ends up being a permissions issue or a length issue. The scripts edit a log file, so I'd like to include any copy errors/issues in that file to check if the copies... (4 Replies)
Discussion started by: Stellaman1977
4 Replies

3. Shell Programming and Scripting

BASH script outputting strange file formats

Hi I am very new to using BASH, but I have a problem with a piece of script that I have been working on. Basically the script goes through a mailbox file looking at particular aspects of the file, for example how many spamwords there are email address etc. It does this pretty well except for an... (13 Replies)
Discussion started by: 9aza
13 Replies

4. Red Hat

Outputting clive --debug to file?

I am running clive on Linux version 2.6.24.5-85.fc8 (Red Hat 4.1.2-33) with the debug command as follows clive --debug -O <logfile> http://www.youtube.com/watch?v.... I need to get the contents of the debug written to file to extract data later. Using the -O option actually writes the... (0 Replies)
Discussion started by: rob171171
0 Replies

5. Shell Programming and Scripting

Outputting discarded GREP lines to a file

I had a question about grep. If I grep for something in a file, the output shows me all the lines in which that 'something' is contained in. Is there a way to also output all the lines in which that 'something' wasnt contained in. Say I have a file with a bunch of names and I do: grep scott... (2 Replies)
Discussion started by: ndedhia1
2 Replies

6. Shell Programming and Scripting

outputting a text file in html

is there anyway i can paste/cat a text file into a html paragraph <p> function html_header { cat <<END <html> <head><title>${1}</title></head> <body> <p> ${2} </p> END } function html_footer { cat <<END </body> </html> END (2 Replies)
Discussion started by: magnia
2 Replies

7. Shell Programming and Scripting

Script Assistance - Outputting to file with Awk

I'm trying to take a list of domains, find out the MX resolve it to IP then find out what the NS is and output the contents to a new file. The only problem i'm having is when checking the Ip or host of the MX i can only get it to print the column with the MX record and the results of the host... (1 Reply)
Discussion started by: spartan22
1 Replies

8. Programming

Perl GD::Graph and outputting to a graphics file

To successfully export a perl GD::Graph object to a graphics file (e.g. a .png file), do you do the following ? # Set graph data $graph->set(....); $graph->plot(\@graph_data); open(IMG,'>file.png') or die $!; binmode IMG; print IMG $graph->png; close IMG; Reason Im asking is... (1 Reply)
Discussion started by: JamesGoh
1 Replies

9. Shell Programming and Scripting

sed not outputting last line of input file

I am using sed for a simple substitution (see command syntax below). Everything works fine except that the last line of the input file does not get written to the output file. Has anyone ever seen this and know of way to force the last line to be written? I don't know if it's playing a part in... (3 Replies)
Discussion started by: 2reperry
3 Replies

10. Shell Programming and Scripting

PHP Outputting finite amount of lines from a file

Hi, I have the code below which outputs all the lines of a CSV file but I'd like it to only output 15 lines then save the current line as a variable which could be used (as a link) to display the next 15 lines. I can't get my head around the logic! Please help :D while ($data = fgetcsv($fp,... (1 Reply)
Discussion started by: pondlife
1 Replies
Login or Register to Ask a Question