Sponsored Content
Full Discussion: Perl script to rotate logs
Top Forums Shell Programming and Scripting Perl script to rotate logs Post 302177572 by KevinADC on Friday 21st of March 2008 03:06:21 PM
Old 03-21-2008
I'd still like to know what this line is supposed to be for?

%ARCHIVE=('*.$MONTH.*'=>1);

wrapping a perl scalar in single-quotes is going to kill the variable expansion and treat it as a litteral string. And the "."'s are not interpolated as concatenation operators if thats what you were expecting, although it is unlcear what you are expecting.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script for Log Rotate

Hello, I only know the basic for shell programing. I need help for this, I thinks this is a basic for anyone who know a litle of shell scripting. I need creat a script for a rotatate logs, when a filesystem is full. I have a filesystem. The rotate consist in zip the current log (copy) and... (1 Reply)
Discussion started by: El Rengo
1 Replies

2. UNIX for Dummies Questions & Answers

Rotate logs every 1 hour

Hello All, I am learning unix and basically I want to rotate one of my application logs every 1 hour. I need to rotate that file every one hour. I looked in the forums and googled.. but couldn;t get proper information. Requesting you all to kindly guide me. Our application is running on... (4 Replies)
Discussion started by: arunpvp
4 Replies

3. Shell Programming and Scripting

Help with a rotate log script

Hi all, Am trying to write my own log rotate script. Curremtly, what I have is as below: #!/bin/ksh file_to_rotate=${1} x=${2} while ] do let curr=${x} let prev=${x}-1 if ] ; then #echo "cp -p ${file_to_rotate} ${file_to_rotate}.${curr}" cp -p... (7 Replies)
Discussion started by: newbie_01
7 Replies

4. Shell Programming and Scripting

Script to rotate file log

Hi Experts, I have script on crontab and give output quite large. I would like to know how to create rotate log when the size of log maximum 50MB if the test.log is 50MB then create test.0 Thanks Edy (2 Replies)
Discussion started by: edydsuranta
2 Replies

5. Shell Programming and Scripting

Perl script to parse multiple windows event logs.

Hi all, I am developing a log parsing agent in perl to send windows Event logs to Zenoss Monitoring tool. Using Win32::EventLog i can able to get the Event messages but only one Eventype eg Application or System could able to parse at a time. Can you please help to how to open mutiple eventlogs... (3 Replies)
Discussion started by: kar_333
3 Replies

6. Shell Programming and Scripting

Perl script to extract last 24 hrs logs from cronlog

Hi Friends, Can anybody help me to create a perl script to generate log file for last 24 hrs from cron log file ?? Thank You (2 Replies)
Discussion started by: syamji.vm
2 Replies

7. UNIX for Dummies Questions & Answers

Need script to rotate logs

I have few solaris-10 non global zones, where one application is writing some logs to /var/ovd/ConfigLogs. It keeps increasing all the time, as it is needed by application team as of now. I want a small script, which I can configure in cronjob, which should : - Run every Saturday 10 PM - Copy... (5 Replies)
Discussion started by: solaris_1977
5 Replies

8. UNIX for Dummies Questions & Answers

Logs do not rotate

My problem: Both access and error logs do not rotate any more and get really large. They are located here: /srv/www/+vHost name here+/logs/ Configuration seems to be here: /etc/logrotate.conf => looks OK, including "size 10M" to avoid large files (/etc/logrotate.d => is empty) manually... (4 Replies)
Discussion started by: floko
4 Replies

9. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

Appreciate help for the below issue. Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt.............. 1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies
Gnome2::GConf::Engine(3pm)				User Contributed Perl Documentation				Gnome2::GConf::Engine(3pm)

NAME
Gnome2::GConf::Engine - A Configuration Engine SYNOPSIS
DESCRIPTION
Gnome2::GConf::Engine is the Perl binding for the "GConfEngine" object. A GConfEngine is a configuration engine, that is a stack of config sources. Normally, there's just one of these on the system. Gnome2::GConf::Engine provides a low-level interface for accessing GConf data; you should normally use a Gnome2::GConf::Client inside your code. SEE ALSO
Gnome2::GConf(3pm), Gnome2::GConf::Value(3pm), Gnome2::GConf::ChangeSet(3pm). HIERARCHY
Glib::Boxed +----Gnome2::GConf::Engine METHODS
list = $engine->all_dirs ($dir) o $dir (string) This method returns an array containing all the directories in a given directory. list = $engine->all_entries ($dir) o $dir (string) This method returns an array containing all the entries of a given directory. boolean = $engine->associate_schema ($key, $schema_key) o $key (string) o $schema_key (string) Associate a schema to a key. $schema_key should have a schema (if $key stores a value) or a dir full of schemas (if $key stores a directory name) changeset = $engine->change_set_from_current ($key, ...) o ... (list) list of keys to add to the changeset Create a Gnome2::GConf::ChangeSet from a list of keys inside the GConf database. boolean = $engine->commit_change_set ($cs, $remove_committed) (boolean, changeset) = $engine->commit_change_set ($cs, $remove_committed) o $cs (changeset) o $remove_committed (boolean) Commit a given Gnome2::GConf::ChangeSet. In scalar context, or if $remove_committed is FALSE, return a boolean value; otherwise, return the boolean value and the Gnome2::GConf::ChangeSet $cs, pruned of the successfully committed changes. engine = Gnome2::GConf::Engine->get_default Get the default Gnome2::GConf::Engine. boolean = $engine->dir_exists ($dir) o $dir (string) engine or undef = Gnome2::GConf::Engine->get_for_address ($address) o $address (string) Create a Gnome2::GConf::Engine for the given address. engine or undef = Gnome2::GConf::Engine->get_for_addresses (...) o ... (list) Create a Gnome2::GConf::Engine for the given addresses. Since: gconf 2.7 value = $engine->get ($key) o $key (string) Fetch and return the Gnome2::GConf::Value bound to the given $key. This overrides Glib::Object's "get", so you'll want to use "$object->get_property" to get object's properties. boolean = $engine->set ($key, $value) o $key (string) o $value (value) Set the Gnome2::GConf::Value bound to the given key. integer = $engine->notify_add ($namespace_section, $func, $data=undef) o $namespace_section (string) o $func (scalar) o $data (scalar) $engine->notify_remove ($cnxn_id) o $cnxn_id (integer) $engine->remove_dir ($dir) o $dir (string) changeset = $engine->reverse_change_set ($cs) o $cs (changeset) Create a change set that would revert the given change set for the given Gnome2::GConf::Engine. $engine->suggest_sync boolean = $engine->unset ($key) o $key (string) Unset the given key. value = $engine->get_with_locale ($key, $locale) o $key (string) o $locale (string) Fetch and return the Gnome2::GConf::Value bound to the given $key, for a specific $locale. Locale only matters if you are expecting to get a schema, or if you don't know what you are expecting and it might be a schema. Note that Gnome2::GConf::Engine::get automatically uses the current locale, which is normally what you want. value = $engine->get_without_default ($key) o $key (string) Fetch the Gnome2::GConf::Value bound to the given key, without returning the default value (specified inside the schema) if the key is unset. SEE ALSO
Gnome2::GConf, Glib::Boxed COPYRIGHT
Copyright (C) 2003-2006 by the gtk2-perl team. This software is licensed under the LGPL. See Gnome2::GConf for a full notice. perl v5.14.2 2011-11-17 Gnome2::GConf::Engine(3pm)
All times are GMT -4. The time now is 09:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy