Please help me out and drag me out the deadlock I am stuck into:
I have a file. I want the statements under a if...then condition be listed in a separate file in the manner condition|statement.Following are the different input pattern and corresponding output parameters.any generic code to... (7 Replies)
I have a file name in $f. If $f has "-" at the beginning, or "=", or does not have extension ".ry" or ".xt" or ".dat" then cerr would not be empty.
Tried the following but having some problems.
set cerr = `echo $f | awk '/^-|=|!.ry|!.xt|!.dat/'` (4 Replies)
At the top of the XYZ file, I need to insert the ABC data value of column 2 only when ABC column 1 matches the prefix XYZ file name (not the ".txt"). Is there an awk solution for this?
ABC Data
0101 0.54
0102 0.48
0103 1.63
XYZ File Name
0101.txt
0102.txt
0103.txt
... (7 Replies)
Hello :)
I am in this situation:
Input: two tab-delimited files, `File1` and `File2`. `File2` (`$2`) has to be parsed by patterns found in `File1` (`$1`).
Expected output: tab-delimited file, `File3`. `File3` has to contain the same rows as `File2`, plus the corresponding value in... (5 Replies)
Hi All,
I have scenario where I need to zip huge number of DB audit log files newer than 90 days and delete anything older than that. If the files are too huge in number,zipping will take long time and causing CPU spikes. To avoid this I wanted to segregate files based on how old they are and... (2 Replies)
Hi ,
I have a situation where I need to search an xml file for the presence of a tag
<FollowOnFrom> and also , presence of partial part of the following tag <ContractRequest _LoadId and if these 2 exist ,then
extract the value from the following tag <_LocalId> which is
"CW2094139". There... (2 Replies)
Delete patterns matching
OS version: RHEL 7.3
Shell : Bash
I have a file like below (pattern.txt). I need to delete all lines starting with the following words (words separated by comma below) and ) character.
LOGGING, NOCOMPRESS, TABLESPACE , PCTFREE, INITRANS, MAXTRANS, STORAGE,... (3 Replies)
Hello,
I need to know all IP range (ip_prefix), associated with us-west-2 region only from this link - https://ip-ranges.amazonaws.com/ip-ranges.json (it can be opened in wordpad for better visibility)
Please suggest, how would I do it. If vi, awk or sed is needed, I have downloaded it on my... (7 Replies)
Discussion started by: solaris_1977
7 Replies
LEARN ABOUT DEBIAN
ropkg::simba::commands
RoPkg::Simba::Commands(3pm) User Contributed Perl Documentation RoPkg::Simba::Commands(3pm)NAME
RoPkg::Simba::Commands
VERSION
0.2.2
DESCRIPTION
RoPkg::Simba::Commands is a class used to count and get the commands from the database.
SYNOPSIS
!#/usr/bin/perl
use RoPkg::DB;
use RoPkg::Simba::Commands;
sub main {
my $dbp = new RoPkg::DB();
$dbp->Add('dbi:mysql:database=mysql;host=localhost',
'root',
'',
'local');
my $m = new RoPkg::Simba::Commands(dbo => $dbp, dbo_method => 'db_local');
print $m->Count,' commands found in database',$/;
}
main();
SUBROUTINES /METHODS
new()
The class constructor. At this moment, it just calls RoPkg::DBObject->new() . Please read the RoPkg::DBObject manual page for more
information about the new() parameters.
Count($fields)
Returns the number of commands from database. The $fields parameter contains a list of WHERE clauses. For more details of $fields see
SQL::Abstract.
Get($fields, $orderby)
Returns a array of RoPkg::Simba::Command objects. The commands are read from the database. The $fields parameter contains a list of WHERE
clauses. For more details of $fields see SQL::Abstract. $orderby is a reference to a array holding the fields specification used for
sorting the data.
DIAGNOSTICS
Unpack the source and use 'make test' command
CONFIGURATION AND ENVIRONMENT
This module does not use any configuration files or environment variables.
DEPENDENCIES
RoPkg::DBCollection and RoPkg::Exceptions
INCOMPATIBILITIES
None known to the author
BUGS AND LIMITATIONS
None know to the author
PERL CRITIC
The code is perl critic level 2 compliant
SEE ALSO
RoPkg::Simba RoPkg::Simba::Command SQL::Abstract
AUTHOR
Subredu Manuel <diablo@iasi.roedu.net>
LICENSE AND COPYRIGHT
Copyright (C) 2005 Subredu Manuel. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the
same terms as Perl itself. The LICENSE file contains the full text of the license.
perl v5.14.2 2006-07-04 RoPkg::Simba::Commands(3pm)