10-19-2008
How to Compare two files depend on line length Chars
I need to compare two files with exactly same length as example: -
File1 contain 500 records with length of 640 chars of each line.
File2 contain 1500 records with length of 640 chars of each line.
I need get an output to be written in File3 which will contain 1000 records difference.
but my diff will be based on line length which is 630 chars and ignore the remaining 10 chars in comparing.
However, file3 I wanted to include all 1000 records with 640 chars lenght for each line.
Thanks in advance
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I know this should be simple, but I've been manning sed awk grep and find and am stupidly stumped :(
I'm trying to use sed (or awk, find, etc) to find 4 characters on the second line of a file.txt 44-47 characters in. I can find lots of sed things for lines, but not characters. (4 Replies)
Discussion started by: unclecameron
4 Replies
2. Shell Programming and Scripting
Dear All
i want to compate two diff file line by line. Kindly help me.
file 1:
1;givi;01012000;wer
2;sss;02012000;rrr
3;ccc;03012000;ttt
file 2:
0;uuu;01012000;lll
1;givi;01012000;wer
2;sss;02012000;rrr
3;ccc;03012000;ttt
5;givi;01012000;hhh
Output1: comman line to both file... (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies
3. Shell Programming and Scripting
Hi all
I need help on comparing two texts files line by line and print the total number of lines matched. Any help is appreciated. Thanks in advance. (4 Replies)
Discussion started by: my_Perl
4 Replies
4. Shell Programming and Scripting
Hi, Unix Gurus:
I have a requirement which need to compare the first line of two files.
e.g;
file1
123
abc
def
file2
123
abcdef
defe
I need compare first line: in two file: in this case, two file contain same value in first line (123)
anybody can help me.
Thanks in advance (2 Replies)
Discussion started by: ken002
2 Replies
5. Shell Programming and Scripting
Using diff to compare 2 files
FILE1:
AAA
AAA
AAA
AAA
AAA
AAA
FILE2:
BBB
BBB
AAA
AAA
BBB
BBB
diff FILE1 FILE2 (3 Replies)
Discussion started by: yannsun
3 Replies
6. Shell Programming and Scripting
Hi All,
I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Discussion started by: mjavalkar
4 Replies
7. Shell Programming and Scripting
Hi,
I have a issue, I need to loop through a comma delimited file and check for the length which exceeds specified length , if Yes truncate the string.
But my problem is , I do not have to check for all the fields and the field lenght is not same for all the fields.
For ex:
Say my line... (9 Replies)
Discussion started by: rashmisb
9 Replies
8. Shell Programming and Scripting
Hi Experts,
Would really appreciate if anyone can guide me how to compare two pdf files line by line and report the difference to another file. (3 Replies)
Discussion started by: prasanth_babu
3 Replies
9. Shell Programming and Scripting
I am new to awk scripting.
I want to do a field by word (field) comparison of two files File1.txt and File2.txt.
The files contain a list of | (pipe) separated field.
**File 1:
-------------------
aaa|bbb|ccc|eee|fff
lll|mmm|nnn|ooo|ppp
rrr|sss|ttt|uuu|vvv**
File 2: ... (7 Replies)
Discussion started by: dhruvmohan
7 Replies
10. UNIX for Beginners Questions & Answers
Hello All!
Thanks for taking time out and helping.
My issue is, I have two files that have file names in it. Now, i need to go through each line of both the files and when the file names are different, i need to rename the file. Below is the example:
File1</
fil1ename1.txt
filename2,txt... (2 Replies)
Discussion started by: svks1985
2 Replies
LEARN ABOUT DEBIAN
gtk2::entrybuffer
Gtk2::EntryBuffer(3pm) User Contributed Perl Documentation Gtk2::EntryBuffer(3pm)
NAME
Gtk2::EntryBuffer - wrapper for GtkEntryBuffer
HIERARCHY
Glib::Object
+----Gtk2::EntryBuffer
The Gtk2::EntryBuffer class contains the actual text displayed in a Gtk2::Entry widget.
A single Gtk2::EntryBuffer object can be shared by multiple Gtk2::Entry widgets which will then share the same text content, but not the
cursor position, visibility attributes, icon etc.
Gtk2::EntryBuffer may be derived from. Such a derived class might allow text to be stored in an alternate location, such as non-pageable
memory, useful in the case of important passwords. Or a derived class could integrate with an application's concept of undo/redo.
METHODS
entrybuffer = Gtk2::EntryBuffer->new ($initial_chars=undef)
o $initial_chars (string)
unsigned = $buffer->get_bytes
integer = $buffer->delete_text ($position=0, $n_chars=-1)
o $position (integer)
o $n_chars (integer)
$buffer->emit_deleted_text ($position, $n_chars)
o $position (integer)
o $n_chars (integer)
$buffer->emit_inserted_text ($position, $chars, $n_chars)
o $position (integer)
o $chars (string)
o $n_chars (integer)
$buffer->insert_text ($position, $chars)
o $position (integer)
o $chars (string)
integer = $buffer->get_length
integer = $buffer->get_max_length
$buffer->set_max_length ($max_length)
o $max_length (integer)
string = $buffer->get_text
$buffer->set_text ($chars)
o $chars (string)
PROPERTIES
'length' (Glib::UInt : default 0 : readable / private)
Length of the text currently in the buffer
'max-length' (integer : default 0 : readable / writable / private)
Maximum number of characters for this entry. Zero if no maximum
'text' (string : default "" : readable / writable / private)
The contents of the buffer
SIGNALS
inserted-text (Gtk2::EntryBuffer, Glib::UInt, string, Glib::UInt)
deleted-text (Gtk2::EntryBuffer, Glib::UInt, Glib::UInt)
SEE ALSO
Gtk2, Glib::Object
COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
perl v5.14.2 2012-05-27 Gtk2::EntryBuffer(3pm)