01-14-2009
for showing and redirecting at the same time, you can use:
./program 2>&1 | tee program.log
in the file program.log, the statement stores stdout and stderr as well.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can I redirect and append stdout and stderr to a file when using cron? Here is my crontab file:
*/5 * * * * /dir/php /dir/process_fns.php >>& /dir/dump.txt
Cron gives me an 'unexpected character found in line' when trying to add my crontab file.
Regards,
Zach Curtis
POPULUS (8 Replies)
Discussion started by: zcurtis
8 Replies
2. Shell Programming and Scripting
#!/usr/bin/perl
open(STDOUT, ">>$Textfile")
open(STDERR, ">>$Textfile")
print "program running\n";
$final = join("+", $initial,$final) #5
close (STDOUT);
close (STDERR);Hi all, above is my perl code. Notice i have captured the stdout and stderr to the same textfile. my code is expected to... (1 Reply)
Discussion started by: new2ss
1 Replies
3. UNIX for Advanced & Expert Users
Hello Everyone!
I'm trying to combine output for standard output and for possible standard error to the log file. I was trying to use tee command, but it turned out if error occurred error output will be send to the screen only and will not be redirected with tee command to the log file.
Anyone... (11 Replies)
Discussion started by: slavam
11 Replies
4. Shell Programming and Scripting
Hi All,
Solarix/Bash v3x
Im trying to output any standard errors created by the script to a file using the below command:
. runDTE.sh 2> "$DTE_ERROR_FILE"
however the errors do get written to the dir/file stored in $DTE_ERROR_FILE but the error does not appear on the terminal screen in... (4 Replies)
Discussion started by: satnamx
4 Replies
5. Shell Programming and Scripting
I'm not a complete novice at unix but I'm not all that advanced either. I'm hoping that someone with a little more knowledge than myself has the answer I'm looking for.
I'm writing a wrapper script that will be passed user commands from the cron...
Ex:
./mywrapper.sh "/usr/bin/ps -ef |... (1 Reply)
Discussion started by: sumgi
1 Replies
6. Red Hat
Hi all. I am trying to use backticks in Perl to put STDERR into a string. The code is...
$readkey_test = `perl -MTerm::ReadKey -e 1`;
print $readkey_test;
if ($readkey_test =~ m/]/)
{
print "ReadKey not installed...\n";
}
else
{
print "ReadKey installed...\n";
}
If it comes up... (3 Replies)
Discussion started by: austinharris43
3 Replies
7. Shell Programming and Scripting
Can somebody explain to me why the diff output is not going to stderr?
Yet when I issue a diff from the command line the return code is -ne 1.
I am guessing diff always writes to stdout???
Is there away I can force the difff to write to stderr USING THE CURRENT
template. If possible, I... (5 Replies)
Discussion started by: BeefStu
5 Replies
8. Shell Programming and Scripting
Hi all,
can someone help me with the next redirection?
i want to redirect the stdout+stderr of a command to the same file (this i can do by prog &> file)
but in addition i want to redirect only the stderr to a different file.
how can i do this please? (in BASH)
thanks. (4 Replies)
Discussion started by: eee
4 Replies
9. Shell Programming and Scripting
Hi,
I've been using the following commands in my automated scripts, to ensure that all text output is sent to a log file instead of to the screen:
exec 1>>$SCRIPT_LOG_FILE
exec 2>>$SCRIPT_LOG_FILE
However, I've now discovered that the system used for automating the script executions... (4 Replies)
Discussion started by: confusedAdmin
4 Replies
10. Shell Programming and Scripting
Hello All,
I have a requirement to redirect stdout and stderr to 'log' file and stderr alone to 'err' file.
Can someone please help me with this?
Thanks in advance (2 Replies)
Discussion started by: vikas_trl
2 Replies
LEARN ABOUT MOJAVE
glgetprograminfolog
GLGETPROGRAMINFOLOG(3G) OpenGL 3.3 GLGETPROGRAMINFOLOG(3G)
NAME
glGetProgramInfoLog - Returns the information log for a program object
C SPECIFICATION
void glGetProgramInfoLog(GLuint program, GLsizei maxLength, GLsizei *length, GLchar *infoLog);
PARAMETERS
program
Specifies the program object whose information log is to be queried.
maxLength
Specifies the size of the character buffer for storing the returned information log.
length
Returns the length of the string returned in infoLog (excluding the null terminator).
infoLog
Specifies an array of characters that is used to return the information log.
DESCRIPTION
glGetProgramInfoLog returns the information log for the specified program object. The information log for a program object is modified when
the program object is linked or validated. The string that is returned will be null terminated.
glGetProgramInfoLog returns in infoLog as much of the information log as it can, up to a maximum of maxLength characters. The number of
characters actually returned, excluding the null termination character, is specified by length. If the length of the returned string is not
required, a value of NULL can be passed in the length argument. The size of the buffer required to store the returned information log can
be obtained by calling glGetProgram() with the value GL_INFO_LOG_LENGTH.
The information log for a program object is either an empty string, or a string containing information about the last link operation, or a
string containing information about the last validation operation. It may contain diagnostic messages, warning messages, and other
information. When a program object is created, its information log will be a string of length 0.
NOTES
The information log for a program object is the OpenGL implementer's primary mechanism for conveying information about linking and
validating. Therefore, the information log can be helpful to application developers during the development process, even when these
operations are successful. Application developers should not expect different OpenGL implementations to produce identical information logs.
ERRORS
GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.
GL_INVALID_OPERATION is generated if program is not a program object.
GL_INVALID_VALUE is generated if maxLength is less than 0.
ASSOCIATED GETS
glGetProgram() with argument GL_INFO_LOG_LENGTH
glIsProgram()
SEE ALSO
glCompileShader(), glGetShaderInfoLog(), glLinkProgram(), glValidateProgram()
COPYRIGHT
Copyright (C) 2003-2005 3Dlabs Inc. Ltd. This material may be distributed subject to the terms and conditions set forth in the Open
Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
OpenGL 3.3 03/08/2011 GLGETPROGRAMINFOLOG(3G)