Hi,
I am trying to remove duplicate lines from a file. For example the contents of example.txt is:
this is a test
2342
this is a test
34343
this is a test
43434
and i want to remove the "this is a test" lines only and end up with the numbers in the file, that is, end up with:
2342... (4 Replies)
Hi,
I need to concatenate three files in to one destination file.In this if some duplicate data occurs it should be deleted.
eg:
file1:
-----
data1 value1
data2 value2
data3 value3
file2:
-----
data1 value1
data4 value4
data5 value5
file3:
-----
data1 value1
data4 value4 (3 Replies)
Hello,
I am in need of removing duplicate lines from within a file per section.
File:
ABC1 012345 header
ABC2 7890-000
ABC3 012345 Header Table
ABC4
ABC5 593.0000 587.4800
ABC5 593.5000 587.6580 <= dup need to remove
ABC5 593.5000 ... (5 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
You will write a script that will remove all HTML tags from an HTML document and remove any consecutive... (3 Replies)
Hi,
I have tried to remove dublicate lines based on first column with pipe delimiter . but i ma not able to get some uniqu lines
Command : sort -t'|' -nuk1 file.txt
Input :
38376KZ|09/25/15|1.057
38376KZ|09/25/15|1.057
02006YB|09/25/15|0.859
12593PS|09/25/15|2.803... (2 Replies)
Discussion started by: parithi06
2 Replies
LEARN ABOUT HPUX
merge
merge(1) General Commands Manual merge(1)NAME
merge - three-way file merge
SYNOPSIS
file1 file2 file3
DESCRIPTION
combines two files that are revisions of a single original file. The original file is file2, and the revised files are file1 and file3.
identifies all changes that lead from file2 to file3 and from file2 to file1, then deposits the merged text into file1. If the option is
used, the result goes to standard output instead of file1.
An overlap occurs if both file1 and file3 have changes in the same place. prints how many overlaps occurred, and includes both alterna-
tives in the result. The alternatives are delimited as follows:
lines in file1
lines in file3
If there are overlaps, edit the result in file1 and delete one of the alternatives.
This command is particularly useful for revision control, especially if file1 and file3 are the ends of two branches that have file2 as a
common ancestor.
EXAMPLES
A typical use for is as follows:
1. To merge an RCS branch into the trunk, first check out the three different versions from RCS (see co(1)) and rename them for
their revision numbers: 5.2, 5.11, and 5.2.3.3. File 5.2.3.3 is the end of an RCS branch that split off the trunk at file 5.2.
2. For this example, assume file 5.11 is the latest version on the trunk, and is also a revision of the "original" file, 5.2.
Merge the branch into the trunk with the command:
3. File 5.11 now contains all changes made on the branch and the trunk, and has markings in the file to show all overlapping
changes.
4. Edit file 5.11 to correct the overlaps, then use the command to check the file back in (see ci(1)).
WARNINGS
uses the ed(1) system editor. Therefore, the file size limits of ed(1) apply to
AUTHOR
was developed by Walter F. Tichy.
SEE ALSO diff3(1), diff(1), rcsmerge(1), co(1).
merge(1)