Hi
Need a perl script to read lines in a file, scan for a string named "APPLE" and write to different file the only lines containing the matched string. (5 Replies)
Hi folks,
I have a text file that I need to parse, and I cant figure it out. The source is a report breaking down softwares from various companies with some basic info about them (see source snippet below). Ultimately what I want is an excel sheet with only Adobe and Microsoft software name and... (5 Replies)
All I want is to look for the pattern in the file...If I found it at # places... I want print lines after those pattern(line) until I find a blank line.
Log EXAMPLE :
MT:Exception caught
The following Numbers were affected:
1234
2345
2346
Error
java.lang.InternalError:... (3 Replies)
Hi All,
Please tell me how can I Find a string using grep & print the line above or below that in solaris?
Please share as I am unable to use grep -A or grep -B as it is not working on Solaris. (10 Replies)
What's the easiest way to search a file for a specific string and then look for other instances after that? I want to search for all Virtual Hosts and print out the Server Name and Document Root (if it has that info), while discarding the rest of the info.
Basically my file looks like this:
...... (6 Replies)
if the first string matches then print the previous line and current line and also print the following lines if the other string search matches.
Input
------
TranTime 2012 10 12
The Record starts here
Accountnumber: 4632473431274
TxnCode 323
TranID 329473242834
ccsdkcnsdncskd... (7 Replies)
Dear all
I want to search special string in file and then print next all line in one line until blank lines come. Help me plz for same. My input file and desire op file is as under.
i/p file:
A1/EXT "BSCABD1_21233G1" 757 130823 1157
RADIO X-CEIVER ADMINISTRATION
BTS EXTERNAL FAULT
... (7 Replies)
Can I do this in one awk session. Solution I have is poor.
I want to return the number after PID.
echo "Start: 12345 is used by PID:11111 username" | awk -F: '{print $3}' | awk '{print $1}' (6 Replies)
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
Ok I would like to do the following
file test contains the following lines. between the lines ABC there may be any amount of lines up to the next ABC entry.
I want to grep for the filename.txt entry and print the lines in between (and including that line) up to and including the last line... (3 Replies)
Discussion started by: revaroo
3 Replies
LEARN ABOUT DEBIAN
nagios::plugin::config
Nagios::Plugin::Config(3pm) User Contributed Perl Documentation Nagios::Plugin::Config(3pm)NAME
Nagios::Plugin::Config - read nagios plugin .ini style config files
SYNOPSIS
# Read given nagios plugin config file
$Config = Nagios::Plugin::Config->read( '/etc/nagios/plugins.ini' );
# Search for and read default nagios plugin config file
$Config = Nagios::Plugin::Config->read();
# Access sections and properties (returns scalars or arrayrefs)
$rootproperty = $Config->{_}->{rootproperty};
$one = $Config->{section}->{one};
$Foo = $Config->{section}->{Foo};
DESCRIPTION
Nagios::Plugin::Config is a subclass of the excellent Config::Tiny, with the following changes:
o Repeated keys are allowed within sections, returning lists instead of scalars
o Write functionality has been removed i.e. access is read only
o Nagios::Plugin::Config searches for a default nagios plugins file if no explicit filename is given to "read()". The current standard
locations checked are:
/etc/nagios/plugins.ini
/usr/local/nagios/etc/plugins.ini
/usr/local/etc/nagios /etc/opt/nagios/plugins.ini
/etc/nagios-plugins.ini
/usr/local/etc/nagios-plugins.ini
/etc/opt/nagios-plugins.ini
To use a custom location, set a "NAGIOS_CONFIG_PATH" environment variable to the set of directories that should be checked. The first
"plugins.ini" or "nagios-plugins.ini" file found will be used.
SEE ALSO
Config::Tiny, Nagios::Plugin
AUTHORS
This code is maintained by the Nagios Plugin Development Team: <http://nagiosplug.sourceforge.net>.
COPYRIGHT and LICENCE
Copyright (C) 2006-2007 by Nagios Plugin Development Team
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2010-12-03 Nagios::Plugin::Config(3pm)