Hello everyone... please help if you can -- I'm stumped. Making this work will save me hours of manual labor:
I need to search file2 for pattern in file1. If pattern found append file2 line to file3. If pattern not found append a blank line to file3.
file1 contents example:
123
456
789... (6 Replies)
I need your help,
I want to add a text every 2nd line and also a blank line after 3 line
(In the output 2nd line is "changetype: modify" and every 4th line is blank line)
Input file format
dn: abc
orclsourceobjectdn: abcd
dn: bcd
orclsourceobjectdn: bcda
dn: cba
orclsourceobjectdn:... (7 Replies)
i need to compare three files in unix
a.txt b.txt c.txt
1 2 1
2 5 3
4 6 5
5 6
6
i need to insert a blank line in the file if i don't find a match
and put the items at the same column if found a match
The items in the files... (4 Replies)
Hi all,
I've googling around forum regarding my prob, the nearest would same as thread tittled Insert blank line if grep not found, but she/he did not mention the solution, so I would like to request your help
I've this task, to search in file2 based on pattern in file1 and output it to... (4 Replies)
Hello,
I am trying to write a script that will count the number of characters for each line in a file and all the lines that have less than 80 characters and that are ending with a period, I want it to insert a blank line after them immediately. But, for whatever reason the condition if ]] is... (3 Replies)
Hi,
I have a file with no blank line anywhere
Its a conf file, The lines between and starts with "#" should be sort out with the first three characters(characters are between (a-z)). and insert a blank space in between the uniq lines. For clear understanding ,pls find the below input file... (11 Replies)
Hello,
I have a file that I want to be able to insert a new line before every instance of a regex. I can get it to do this for each line that contains the regex, but not for each instance.
Contents of infile:
Test this 1...
Test this 2...
Test this 3... Test this 4... Test this... (2 Replies)
Hello.
I have a config file (/etc/my_config_file) which may content :
#
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200
# network interfaces to serve, comma delimited
network_interface=eth0
# set this to the directory you want scanned.
# * if have multiple... (6 Replies)
Dear Team
I need to insert field(which is need to taken from previous line's first field) in first column if its blank. I had tried using sed but not find the way. Detail input and output file as below.
Kindly help for same.
INPUT:
SCGR SC DEV DEV1 NUMDEV DCP ... (7 Replies)
Dear All,
In a CSV file, say that a given column has been extracted. In that column, information is missing (i.e. blank lines appear). I would like to replace the blank lines by the last valid line (not blank) previously read.
For example, consider the extract below:
123
234
543
111... (7 Replies)
Discussion started by: bagvian
7 Replies
LEARN ABOUT CENTOS
tk::derived
Derived(3) User Contributed Perl Documentation Derived(3)NAME
Tk::Derived - Base class for widgets derived from others
SYNOPSIS
package Tk::MyNewWidget;
use Tk::widgets qw/ BaseWidget, list of Tk widgets /;
use base qw/ Tk::Derived Tk::BaseWidget /;
Construct Tk::Widget 'MyNewWidget';
sub ClassInit {
my( $class, $mw ) = @_;
#... e.g., class bindings here ...
$class->SUPER::ClassInit( $mw );
}
sub Populate {
my( $self, $args ) = @_;
my $flag = delete $args->{-flag};
if( defined $flag ) {
# handle -flag => xxx which can only be done at create
# time the delete above ensures that new() does not try
# and do $self->configure( -flag => xxx );
}
$self->SUPER::Populate( $args );
$self = $self->Component( ... );
$self->Delegates( ... );
$self->ConfigSpecs(
'-cursor' => [ SELF, 'cursor', 'Cursor', undef ],
'-something' => [ METHOD, dbName, dbClass, default ],
'-text' => [ $label, dbName, dbClass, default ],
'-heading' => [ {-text => $head},
heading, Heading, 'My Heading' ],
);
}
sub something {
my( $self, $value) = @_;
if ( @_ > 1 ) {
# set it
}
return # current value
}
DESCRIPTION
Tk::Derived is used with Perl's multiple inheritance to override some methods normally inherited from Tk::Widget.
Tk::Derived should precede any Tk widgets in the class's base class definition.
Tk::Derived's main purpose is to apply wrappers to "configure" and "cget" methods of widgets to allow the derived widget to add to or
modify behaviour of the configure options supported by the base widget.
The derived class should normally override the "Populate" method provided by Tk::Derived and call "ConfigSpecs" to declare configure
options.
The public methods provided by Tk::Derived are as follows:
->ConfigSpecs(-key => [kind, name, Class, default], ...)
SEE ALSO
Tk::ConfigSpecs Tk::mega Tk::composite
perl v5.16.3 2014-06-10 Derived(3)