04-10-2011
logging errors using perl
Hi,
Can some one please tell me how to redirect only errors to the log file using perl.
Thanks,
Anjan.
---------- Post updated at 08:41 PM ---------- Previous update was at 08:39 PM ----------
Also, i dont want to use any module. Please tell me in normal way
9 More Discussions You Might Find Interesting
1. Solaris
The errors are coming up on my display and screwing up the console windows that I am trying to work from.
They take up about half the screen. Anyone know how I can stop them?
Also, one of the errors is a sendmail noqueu syserr anyone seen it? (4 Replies)
Discussion started by: calamine
4 Replies
2. Shell Programming and Scripting
All,
Does it matter what perl verios your running when you get syntax errors?
on version 5.6.1 the code works fine, but on 5.8.0 the code gets errors?
#!/usr/bin/perl
#use strict;
#use warnings;
my $mess = 'messages';
my $mess1 = 'messages.1';
my $mess2 = 'messages.2';
my... (13 Replies)
Discussion started by: bigben1220
13 Replies
3. Shell Programming and Scripting
Hi,
I am a newbie to PERL and working on a script. When running it I get a lot of compilation errors.
The actual command in the program (which is within a case structure) is given below
# This gives the actual count of inquires from a log file (It works fine when I type this on the... (2 Replies)
Discussion started by: nurani
2 Replies
4. Shell Programming and Scripting
When trying to use backticks for system commands, is there a way to read the error messages if a command doesn't execute properly?
I have no problem getting the results if the command is properly executed.
Ex.
my @result = `dir`;
foreach my $line (@result) {
print "Result = $line";... (2 Replies)
Discussion started by: kooshi
2 Replies
5. Shell Programming and Scripting
I have a shell program which calls a perl program.
I am running the shell program with command;
$ ksh -x <prog_name>
Inside the shell program, I am calling perl with warnings.
I want to capture the entire output as it comes on screen.
The command I tried is:
$ ksh -x... (1 Reply)
Discussion started by: som.nitk
1 Replies
6. Programming
Hi Guys,
Hope everyone is fine :)
I have this code below:
#!/usr/bin/perl
$num_of_files=`ls | grep -v remover | wc -l`;
$remover=`ls -lrt | grep -v total | grep -v remover | head -1 | awk '{print $8}' | rm \`xargs\``;
if ($num_of_files>3) {
system ($remover);
}
When I... (3 Replies)
Discussion started by: rymnd_12345
3 Replies
7. Shell Programming and Scripting
My logs aren't correct. Im trying to log failure and successes, then use the resulting successes file "seed" to perform another function. Problem is that the log has only a single random entry.
Thanks in advance for the help !
!#/usr/bin/expect
set count 0
set bcount 0
set fcnb 923... (0 Replies)
Discussion started by: sumguy
0 Replies
8. Programming
co
#! /usr/bin/perl
use strict;
use warnings;
use diagnostics;
my $amount=""; my $bain; ; my $code="";
my $date;my $day;my $line; my $mo; my $LNUM = 0;
my $xyz=""; my $yr;
$yr = 2015;
my $F; my @F;
while (<>) {
chop;
++$LNUM;
@F = split(';');
if ( $F eq "Date" )... (1 Reply)
Discussion started by: hpk
1 Replies
9. Shell Programming and Scripting
When I run this
#!/bin/bash
Block count: 421958912
Reserved block count: 4219589
perl -e "printf(\"%.1lf%%\n\", ($Reserved block count * 100.0 ) / $Block count);"
I get these error messages. Can someone please help me?
andyk_~/Downloads$ Show_Percent_Reserved_Blocks.sh... (4 Replies)
Discussion started by: drew77
4 Replies
LEARN ABOUT DEBIAN
springlobby
SPRINGLOBBY(6) Games SPRINGLOBBY(6)
NAME
springlobby - A spring lobby
SYNOPSIS
springlobby [-nc|--no-crash-handler] [-cl|--console-logging] [-gl|--gui-logging] [-l|--log-verbosity NUM]
springlobby [-h|--help]
DESCRIPTION
Springlobby is a multiplayer / singleplayer lobby for spring.
Spring is a free Real Time Strategy (RTS) game engine originally designed to play Total Annihilation ((C) 1997 Cavedog) content and evolved
to a general rts engine capable to run different kind of games (mods).
It is mainly designed around online multiplayer games but can be played in single player mode against different AI.
OPTIONS
-h, --help
Prints the options help message and exits.
-nc, --no-crash-handler
Don't use the crash handler (useful for debugging)
-cl, --console-logging
Shows application log to the console(if available)
-gl, --gui-logging
Enables application log window
-l, --log-verbosity=NUM
Overrides default logging verbosity, can be:
0 - no log
1 - critical errors
2 - errors
3 - warnings (default)
4 - messages
5 - function trace
FILES
/etc/spring/datadir
$HOME/.springlobby
Contain the path used by spring and springlobby to save downloaded files and temporary datas.
SEE ALSO
spring(6)
HOMEPAGE
More information about the spring can be found on link:http://www.springlobby.info
AUTHOR
Springlobby was written by the springlobby developers.
This manual page was written by Marco Amadori <marco.amadori@gmail.com[1]>, for the Debian project (and may be used by others).
NOTES
1. marco.amadori@gmail.com
mailto:marco.amadori@gmail.com
Springlobby distribution 05/22/2012 SPRINGLOBBY(6)