I'm working on a script that will perform a backup, save a log of said backup and send the output to me in an email. Everything is working fine so far except that I can't figure out how to specify a maximum file size for the log file. I don't want a runaway log file jamming up the server.... (7 Replies)
Hi guys,
I Have written a script,In that it will call another file which contains the sql quaries.
while wxecuting that I am getting the below exception
01/16|06:28:06:16800: Operating System Error|Failed to open output file
Can anybody help me about this,,Its urgent (0 Replies)
Hi All :
I wanted a unix command by which I could be able to print the output to a file and at the same time to a printer. Any help will be greatly appreciated.
Regards,
Ramamurthy Dasari (1 Reply)
Hello,
If I run a program from within shell, the output is displayed in the command line terminal. Is there a way I can capture that output and choose only the very last string in it to send it to a new file?
Thank you (6 Replies)
Hi,
I am running a shell script called dbProcess.sh which performs shutdown and startup of various Oracle instances we have.At the time of execution the script produces the following output to the command line window
$./dbProcess.sh stop
#### Run Details ######
Hostname : server-hop-1... (4 Replies)
Hi
I have a script that will run multiple unix & sql commands. I want to see the output as well as capture it to a log file for further analysis. Is there an easy way to do that instead of adding "tee -a logfile" on everyline or even on the execute line (i.e. script | tee -s logfile).
Thanks (1 Reply)
I want to capture the debug for the below command in output file .
i tried like this but its not working:
sh -xv <scriptname> >> output.log
i want the output in a log file.
Anyone plz help in this (2 Replies)
Hi All. Thanks for your help in advance.
I have a requirement to examine the number of delimiters in each record of a file. If the record has the expected number of delimiters it should be passed into a 'good' file. If it does not, the record should be passed into a 'bad' file. I have been able... (8 Replies)
Hello, I need to get few values from a XML file and output needs to be written in another file with pipe delimited format. The Header & Footer of the Pipe Delimited file will be constant.
The below is my sample XML file. I need to pull the values in between the XML tags <Operator_info to... (15 Replies)
Hi,
I have a script that runs a tar command to standard out then pipes to a gzip:
tar cfE - * | gzip -c > OUT.gz
At the moment, even if the tar fails (e.g. because of lack of disk space), the gzip still runs successfully.
Is there a way to make the whole line exit with a non-zero error... (6 Replies)
Perl::Critic::Policy::ErrorHandling::RequireCarping(3) User Contributed Perl Documentation Perl::Critic::Policy::ErrorHandling::RequireCarping(3)NAME
Perl::Critic::Policy::ErrorHandling::RequireCarping - Use functions from Carp instead of "warn" or "die".
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
The "die" and "warn" functions both report the file and line number where the exception occurred. But if someone else is using your
subroutine, they usually don't care where your code blew up. Instead, they want to know where their code invoked the subroutine. The Carp
module provides alternative methods that report the exception from the caller's file and line number.
By default, this policy will not complain about "die" or "warn", if it can determine that the message will always result in a terminal
newline. Since perl suppresses file names and line numbers in this situation, it is assumed that no stack traces are desired either and
none of the Carp functions are necessary.
die "oops" if $explosion; #not ok
warn "Where? Where?!" if $tiger; #not ok
open my $mouth, '<', 'food'
or die 'of starvation'; #not ok
if (! $dentist_appointment) {
warn "You have bad breath!
"; #ok
}
die "$clock not set.
" if $no_time; #ok
my $message = "$clock not set.
";
die $message if $no_time; #not ok, not obvious
CONFIGURATION
By default, this policy allows uses of "die" and "warn" ending in an explicit newline. If you give this policy an
"allow_messages_ending_with_newlines" option in your .perlcriticrc with a false value, then this policy will prohibit such uses.
[ErrorHandling::RequireCarping]
allow_messages_ending_with_newlines = 0
If you give this policy an "allow_in_main_unless_in_subroutine" option in your .perlcriticrc with a true value, then this policy will allow
"die" and "warn" in name space main:: unless they appear in a subroutine, even if they do not end in an explicit newline.
[ErrorHandling::RequireCarping]
allow_in_main_unless_in_subroutine = 1
BUGS
Should allow "die" when it is obvious that the "message" is a reference.
SEE ALSO
Carp::Always
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module.
perl v5.16.3 2014-06-09 Perl::Critic::Policy::ErrorHandling::RequireCarping(3)