Which part of your pipeline is giving you the errors that you want trapped?
The way you have the pipeline written only gzip errors will be sent to the log file. If you want all errors, from any process in the pipe, written to the log try this:
The pipeline is run in a sub-shell and the stderror from the subshell (all processes) will be sent to the log file.
If the errors you are trying to trap are just from gzip, then I'm not sure what is going on as your code looks ok from the brief scan I did.
We are running HP UNIX 11.0, and a patch applied 6 months ago. Ever since the patch, any scripts that run as script_name 1>&2 will write all the output to our /etc/cmcluster/package_name/package_cntl.log which is owned by root
(the permission of the log file is -rwxr----- root sys)
Does... (1 Reply)
Hi all,
I need to redirect stdout and stderr to a file in a ksh shell. That's not a problem. But I need also the correct exit code for the executed command. In the example below I redirect correctly the stdout & stderr to a file, but I have the exit code of tee command and not for the mv... (2 Replies)
Friends
I have to redirect STDERR messages both to screen and also capture the same in a file.
2 > &1 | tee file works but it also displays the non error messages to file, while i only need error messages.
Can anyone help?? (10 Replies)
Hi friends
I am facing one problem while redirecting the out of the stderr and stdout to a file
let example my problem with a simple example
I have a file (say test.sh)in which i run 2 command in the background
ps -ef &
ls &
and now i am run this file and redirect the output to a file... (8 Replies)
working on a c sell script
I think I understand the concept of it, which is:
filename >> file.txt (to appaend)
or filename | tee -a file.txt (to append)
The problem is that my shell script is used with several parameters, and these commands don't seem to work with just filename. They... (2 Replies)
Hi
I am not if this is possible: is it possible in bach (or another shell) to redirect GLOBALLY the stdout/stderr channels to a file.
So, if I have a script
script.sh
cmd1
cmd2
cmd3
I want all stdout/stderr goes to a file. I know I can do:
./script.sh 1>file 2>&1
OR
... (2 Replies)
Hello
I read a lot of post related to this topic, but nothing helped me. :mad:
I'm running a ksh script with subshell what processing some ldap command. I need to check output for possible errors.
#!/bin/ksh
...
readinput < $QCHAT_INPUT |&
while read -p line
do
echo $line
... (3 Replies)
Currently I am redirecting STDERR and STDOUT to a log file by doing the following
{
My KSH script contents
} 2>&1 | $DEBUGLOG
Problem is the STDERR & STDOUT do not have any date/time associated.
I want this to be something that i can embed into a script opposed to an argument I use... (4 Replies)
Dear all,
redirecting STDOUT & STDERR to file is quite simple, I'm currently using:
exec 1>>/tmp/tmp.log; exec 2>>/tmp/tmp.logBut during script execution I would like the output come back again to screen, how to do that?
Thanks
Lucas (4 Replies)
Dear all,
redirecting STDOUT & STDERR to file is quite simple, I'm currently using:
Code:
exec 1>>/tmp/tmp.log; exec 2>>/tmp/tmp.log
But during script execution I would like the output come back again to screen, how to do that?
Thanks
Luc
edit by bakunin: please use CODE-tags like the... (6 Replies)
Discussion started by: tmonk1
6 Replies
LEARN ABOUT OSX
svk::log::filterpipeline
SVK::Log::FilterPipeline(3) User Contributed Perl Documentation SVK::Log::FilterPipeline(3)NAME
SVK::Log::FilterPipeline - a pipeline of log filter objects
DESCRIPTION
An SVK::Log::FilterPipeline represents a particular collection of log filter objects each of which needs to be called in turn.
METHODS
new
Construct a new SVK::Log::FilterPipeline object by constructing the specific filters that will handle the details and preparing for the
first revision.
build_filter_object
Given the name of a filter, try and construct an appropriate filter object. Search @INC for modules that match the name given. If no
appropriate classes are available, we die with an appropriate warning.
This method creates an object for the filter by calling its new() method
filter
SVK::Command::Log calls this routine when it wants to display (or process) a revision. The method then dispatches the information to the
methods of the necessary filter objects in the pipeline to perform the real work.
finished
Tell all the filters that their jobs are done by calling "footer" and "teardown" on each one.
get_pipeline_command
Examine an exception to determine if it's a pipeline control exception. If it is, return the desired pipeline command. If it's not,
rethrow the exception. If no exception is provided, the command 'continue' is returned.
present_revision
Display a single revision by passing it to the pipeline's presentation filter.
run_pipeline
Send a revision down the pipeline. Provide revision information to the revision() method of each filter in the pipeline until one of them
says to stop. Then return the pipeline command.
set_up_presentation
Handle initial set up for the presentation filter. This should only be called once during an SVK::Log::FilterPipeline's lifetime.
set_up_selection
Handle initial set up for the selection filter pipeline. This should only be called once during "SVK::Log::FilterPipeline"'s lifetime.
split_filter
Split a string into a filter name and an arbitrary argument string.
split_selectors
Split the description of the selection filter pipeline into individual filter names and their arguments. Each filter is separated by a '|'
character. Literal pipe characters are included with '|'.
perl v5.10.0 2008-08-04 SVK::Log::FilterPipeline(3)