Hey Guys,
i am new into shell programming and i have to do one script which have to record all the commands entered by a specific user.
Example of that, i have a system running on unix, several users are using this system, i have to create like a databse which will record every user entered that... (5 Replies)
Hy, I have a question
I have a directory in a unix server,
Some of my files have a diffrent access time,
from the time i accessed them last,
I think some one has copied it,it's not an important file,but none the less,it is my file,It mistakenly had a 777 permission( yes ,I know it is a noob's... (1 Reply)
Hi,
I am trying to write a script which would go search and get the info from the logs based on yesterday timestamp and write yesterday logs in new file. The log file format is as follows:
""""""""""""""""""""""""""... (3 Replies)
Hi,
I urgently need some help how to extract distinct entries from a Log file.
The Log File may have same error occuring many times so how do i count the occurance of an error in file and also extract out distinct errors in a file.
Eg:-
I have a file name A.log
it contains entries as below:-... (5 Replies)
I have hundreds of files to process. In each file
I need to look for a pattern then
extract value(s) from next line and then
search for value(s) selected from point (2) in the same file at a specific position.
HEADER ELECTRON TRANSPORT 18-MAR-98 1A7V
TITLE CYTOCHROME... (7 Replies)
Hi Experts,
I am new to shell.How to extract logs (Web,APP,Database) using shell in performance testing?
Need for webserver logs,app server logs and d/b logs code.
Thanks in advance
Sree (3 Replies)
I want to extract the logs between the current time stamp and 15 minutes before and sent an email to the people configured. I developed the below script but it's not working properly; can someone help me?? I have a log file containing this pattern:
Constructor QuartzJob
... (3 Replies)
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
LEARN ABOUT DEBIAN
true
true(3pm) User Contributed Perl Documentation true(3pm)NAME
true - automatically return a true value when a file is required
SYNOPSIS
package Contemporary::Perl;
use strict;
use warnings;
use true;
sub import {
strict->import();
warnings->import();
true->import();
}
DESCRIPTION
Perl's "require" builtin (and its "use" wrapper) requires the files it loads to return a true value. This is usually accomplished by
placing a single
1;
statement at the end of included scripts or modules. It's not onerous to add but it's a speed bump on the Perl novice's road to
enlightenment. In addition, it appears to be a non-sequitur to the uninitiated, leading some to attempt to mitigate its appearance with a
comment:
1; # keep require happy
or:
1; # Do not remove this line
or even:
1; # Must end with this, because Perl is bogus.
This module packages this "return true" behaviour so that it need not be written explicitly. It can be used directly, but it is intended
to be invoked from the "import" method of a Modern::Perl-style module that enables modern Perl features and conveniences and cleans up
legacy Perl warts.
METHODS
"true" is file-scoped rather than lexically-scoped. Importing it anywhere in a file (e.g. at the top-level or in a nested scope) causes
that file to return true, and unimporting it anywhere in a file restores the default behaviour. Redundant imports/unimports are ignored.
import
Enable the "automatically return true" behaviour for the currently-compiling file. This should typically be invoked from the "import"
method of a module that loads "true". Code that uses this module solely on behalf of its callers can load "true" without importing it e.g.
use true (); # don't import
sub import {
true->import();
}
1;
But there's nothing stopping a wrapper module also importing "true" to obviate its own need to explicitly return a true value:
use true; # both load and import it
sub import {
true->import();
}
# no need to return true
unimport
Disable the "automatically return true" behaviour for the currently-compiling file.
EXPORT
None by default.
NOTES
Because some versions of YAML::XS may interpret the key of "true" as a boolean, you may have trouble declaring a dependency on true.pm.
You can work around this by declaring a dependency on the package true::VERSION, which has the same version as true.pm.
SEE ALSO
o latest
o Modern::Perl
o nonsense
o perl5i
o Toolkit
o uni::perl
AUTHOR
chocolateboy, <chocolate@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2010-2011 by chocolateboy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or,
at your option, any later version of Perl 5 you may have available.
perl v5.14.2 2011-04-18 true(3pm)