09-10-2012
Dear Chubler_XL
It works like magic. For the first time my database has no errors and all the names are perfectly merged. This has saved me days of checking and validation. The diagnostic routine I had written to identify dupes along multiple lines now shows that there are no dupes in any file.
Many thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello. I would be very pleased if sb. help me to solve my problem. I've got a file with many non blank lines and I want to merge all lines into one not destroy the informations on them. I've tryed it with split and paste, tr, sed , but everything I've done has been wrong. I know about crazy... (8 Replies)
Discussion started by: Foxgard
8 Replies
2. Shell Programming and Scripting
Hi,
Anybody help on this. :(
I want to merge the line with previous line, if the line starts with 7.
Otherwise No change in the line.
Example file aa.txt is like below
122122
222222
333333
734834
702923
389898
790909
712345
999999
My output should be written in another file... (6 Replies)
Discussion started by: senthil_is
6 Replies
3. Shell Programming and Scripting
I have a large file where some lines have been split into two lines; some of them even with white spaces before the second line. e.g in the following text I want to merge only specific lines ( say UNIX is cool), also removing white spaces only between them, others shall remain same on the output.... (4 Replies)
Discussion started by: sunny23
4 Replies
4. Shell Programming and Scripting
Hi folks.
Could somebody help me write a script or command that will look through a file and for every line that doesn't contain a certain value, merge it with the one above?
For example, the file contains:
SCOTLAND|123|ABC|yes
SCOTLAND|456|DEF|yes
SCOTLAND|78
9|GHI|yes
... (3 Replies)
Discussion started by: MDM
3 Replies
5. Shell Programming and Scripting
Hi everyone,
I have two files (A and B) and want to combine them to one by always taking 10 rows from file A and subsequently 6 lines from file B. This process shall be repeated 40 times (file A = 400 lines; file B = 240 lines).
Does anybody have an idea how to do that using perl, awk or sed?... (6 Replies)
Discussion started by: ink_LE
6 Replies
6. Shell Programming and Scripting
Thanks it worked for me. I have one more question on top of that. We had few records which were splitted in 2 lines instead of one. Now i identified those lines. The file is too big to open via vi and edit it. How can i do it without opening the file.
Suppose, I want line number 1001 & 1002 to... (2 Replies)
Discussion started by: Gangadhar Reddy
2 Replies
7. Shell Programming and Scripting
Hello,
I have a very large dictionary file which is in text format and which contains a large number of sub-sections. Each sub-section starts with the following header :
#DATA
#VALID 1
and ends with a footer as shown below
#END
The data between the Header and the Footer consists of... (6 Replies)
Discussion started by: gimley
6 Replies
8. Shell Programming and Scripting
I have a small problem, which due to my lack of knowledge, has left me unable to decipher some of the solutions that I looked at on these forums.
So below is a piece of text, which I ran via cat -vet, which comes from within a program file. I have many such programs to process and repeatable,... (4 Replies)
Discussion started by: skarnm
4 Replies
9. Shell Programming and Scripting
Hello all,
I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person.
In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am attempting to merge the following lines which run over two lines using awk.
INITIAL OUTPUT
2019 Sep 28 10:47:24.695 hkaet9612 last message repeated 1 time
2019 Sep 28 10:47:24.695 hkaet9612 %ETHPORT-5-IF_DOWN_INTERFACE_REMOVED: Interfa
ce Ethernet1/45 is down (Interface removed)... (10 Replies)
Discussion started by: sand1234
10 Replies
LEARN ABOUT DEBIAN
emgrip-dupes
EMGRIP-DUPES(1) User Contributed Perl Documentation EMGRIP-DUPES(1)
NAME
emgrip-dupes - find packages listed in more than one component
Synopsis
Syntax: emgrip-dupes -b PATH [OPTIONS]
emgrip-dupes -b PATH -m|--merge NAME [OPTIONS]
emgrip-dupes -b PATH -p|--purge NAME [OPTIONS]
emgrip-dupes -?|-h|--help|--version
Commands:
-b|--base-path PATH: path to the top level grip directory [required]
-a|--arch ARCHITECTURE: architecture to test [default: i386]
-m|--merge NAMES: retain this duplicate at the latest version in all
-p|--purge NAMES: remove the duplicates from 'main'
-t|--trim NAMES: retain the duplicates in main only
-?|-h|--help|--version: print this help message and exit
Options:
--grip-name STRING: alternative name for the grip repository
-s|--suite SUITE: suite to check (default: unstable)
-n|--dry-run: print the reprepro commands that would be used.
Description
emgrip-dupes scans the Grip repository Packages data and configuration, identifies the supported list of components in the requested suite.
In some cases, these duplicates are useful and only a small amount of space is taken up by the extra listing. However, the version in one
component can easily be out of sync with the version in another.
The main emphasis is on the size of the Packages file for the 'main' component (the one that every user needs to download). Purge mode will
remove the listing of the specified package from 'main'. Merge mode will bring the outdated version into line with the most recent version
of the package so that all components list the most recent version.
Limitations
Next step is to automate the "correction" of the duplicates but this does need care. Manual corrections involve identifying the packages to
retain in main (where the duplicate in dev, doc or debug is not wanted) and pass those to --trim.
The more complex case is to remove from main (e.g. package name suffix is -dev or -doc or -dbg or the Section is devel, dbg, doc or
libdevel). emgrip-dupes --purge removes each binary separately because removing the package from main in a single operation will also
remove the source. This is a particular problem if the source package also builds binary packages that are intended for main, e.g. dbus.
Copyright and Licence
Copyright (C) 2009 Neil Williams <codehelp@debian.org>
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
perl v5.12.3 2011-03-27 EMGRIP-DUPES(1)