The following solution (albeit not pretty) relies on substituting characters and temporarily removing new-line characters so as to facilitate the grep command. Once the grep is executed, then the data is re-expanded.
Is there a way to grep for something and then print out 10 lines after it.
for example if I want to grep for a word, then output the following 10 or whatever number of lines after the word. (5 Replies)
Hello.
I have a dir of 1500+ dir. In these dirs is a file host, with a tag <x_tag>.
I need to :
1. grep for all dir that contain this host file that contain <x_tag>
2. print a list of these host files containing <x_tag>
is this better to egrep this? (5 Replies)
Using shell scripts, I use grep to find the word “error” in a log file:
grep error this.log.
How can I print or get the line 3 lines below the line that word “error” is located?
Thanks in advance for your response. (9 Replies)
I found another problem with my disk-adding script today. When looking for disks, I use grep.
When I grep for the following disk sizes:
5242880
I also pick up these as well:
524288000
How do I specifically pick out one or the other, using grep, without resorting to the -v option?
... (9 Replies)
Hi All,
I was recently helped out 'big time' with my last post on changing multiple file formats (thx, scott1256ca and bakunin)!
My new question is about selecting and displaying columns in a file using (possibly) grep. Several of my data files are spreadsheet format (columns separated by... (8 Replies)
Hi
I have two files
File 1
alias HOME =..
alias DATA = ${DATA}/runtime1/test
alias SQL = ${DATA}/find1dir/test
alias SQL1 = ${HOME}/sql/orcl
alias SQL2 =... (2 Replies)
Hi all,
Need your help here. I have a file with thousand of lines, as shown in example below
KDKJAA 98324
OIDSAJ 324
KJAJAK 100
KJKAJK 89
JOIJOI 21
JDKDJL 12
UOIUOD 10
UDUYDS 8
UIUHKK 6
I would like to grep using... (5 Replies)
I have a script to sort a list of arbitrary hosts and determine if they are supported by grepping them into a master supported list. I cut all the suffixes of the hosts in the arbitrary list, leaving the "short" hostname if you will, then grep -w them into the master list. For example:
... (1 Reply)
Dear Experts,
Need your help.
Typically we use "grep" to search and display a pattern in a txt file.
However, here what we want is, we want to grep a line which contains 4 words any where in a line.
For example.
File has 10,000,000 lines in it out of which there is a particular line which... (1 Reply)
Hey Friends,
Need your help again.
I have input.temp file as follows
$cat input.temp
Lakme|Beauty Products|Lipstick
L'Oreal|Hair Care|Conditioner
Lakme|Beauty Products|Lip gloss
L'Oreal|Hair Care|Mild Shampoo
Gala|Beauty Products|Mehndi Cones
Lakme|Beauty Products|Eye Shadow... (2 Replies)
Discussion started by: anushree.a
2 Replies
LEARN ABOUT DEBIAN
config::model::itself::backenddetector
Config::Model::Itself::BackendDetector(3pm) User Contributed Perl Documentation Config::Model::Itself::BackendDetector(3pm)NAME
Config::Model::Itself::BackendDetector - Detect available read/write backends
SYNOPSIS
# this class should be referenced in a configuration model and
# created only by Config::Model::Node
my $model = Config::Model->new() ;
$model ->create_config_class
(
name => "Test",
'element'
=> [
'backend' => { type => 'leaf',
class => 'Config::Model::Itself::BackendDetector' ,
value_type => 'enum',
# specify backends built in Config::Model
choice => [qw/cds_file perl_file ini_file augeas custom/],
help => {
cds_file => "file ...",
ini_file => "Ini file ...",
perl_file => "file perl",
custom => "Custom format",
augeas => "Experimental backend",
}
}
],
);
my $root = $model->instance(root_class_name => 'Test') -> config_root ;
my $backend = $root->fetch_element('backend') ;
my @choices = $backend->get_choice ;
DESCRIPTION
This class is derived from Config::Model::Value. It is designed to be used in a 'enum' value where the choice (the available backends) are
the backend built in Config::Model and all the plugin backends. The plugin backends are all the "Config::Model::Backend::*" classes.
This module will detect available plugin backend and query their pod documentation to provide a contextual help for config-model graphical
editor.
AUTHOR
Dominique Dumont, (ddumont at cpan dot org)
SEE ALSO
Config::Model, Config::Model::Node, Config::Model::Value
perl v5.14.2 2012-06-22 Config::Model::Itself::BackendDetector(3pm)