Sponsored Content
Top Forums Shell Programming and Scripting Remove duplicated records and update last line record counts Post 303032051 by RudiC on Sunday 10th of March 2019 06:45:15 AM
Old 03-10-2019
On top of what Don Cragun said, the last approach would not account for "duplicate duplicates".


Illogic nonsense... please disregard.

Last edited by RudiC; 03-10-2019 at 08:33 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove duplicated xml record in a file under unix

Hi, If i have a file with xml format, i would like to remove duplicated records and save to a new file. Is it possible...to write script to do it? (8 Replies)
Discussion started by: happyv
8 Replies

2. Shell Programming and Scripting

remove duplicated columns

hi all, i have a file contain multicolumns, this file is sorted by col2 and col3. i want to remove the duplicated columns if the col2 and col3 are the same in another line. example fileA AA BB CC DD CC XX CC DD BB CC ZZ FF DD FF HH HH the output is AA BB CC DD BB CC ZZ FF... (6 Replies)
Discussion started by: kamel.seg
6 Replies

3. Shell Programming and Scripting

Help to Add and Remove Records only from first line/last line

Hi, I need help with a maybe total simple issue but somehow I am not getting it. I am not able to etablish a sed or awk command which is adding to the first line in a text and removing only from the last line the ",". The file is looking like follow: TABLE1, TABLE2, . . . TABLE99,... (4 Replies)
Discussion started by: enjoy
4 Replies

4. Shell Programming and Scripting

Sending e-mail of record counts in 3 or more files

I am trying to load data into 3 tables simultaneously (which is working fine). Then when loaded, it should count the total number of records in all the 3 input files and send an e-mail to the user. The script is working fine, as far as loading all the 3 input files into the database tables, but... (3 Replies)
Discussion started by: msrahman
3 Replies

5. Shell Programming and Scripting

Split a single record to multiple records & add folder name to each line

Hi Gurus, I need to cut single record in the file(asdf) to multile records based on the number of bytes..(44 characters). So every record will have 44 characters. All the records should be in the same file..to each of these lines I need to add the folder(<date>) name. I have a dir. in which... (20 Replies)
Discussion started by: ram2581
20 Replies

6. UNIX for Dummies Questions & Answers

Hardcoding & Record counts in a file

HI , I am having a huge comma delimiter file, I have to append the following four lines before the starting of the file through a shell script. FILE NAME = TEST_LOAD DATETIME = CURRENT DATE TIME LOAD DATE = CURRENT DATE RECORD COUNT = TOTAL RECORDS IN FILE Source data 1,2,3,4,5,6,7... (7 Replies)
Discussion started by: shruthidwh
7 Replies

7. Shell Programming and Scripting

New file should store all the 7 existing filenames and their record counts and ftp th

Hi, I need help regarding below concern. There is a script and it has 7 existing files(in a path say,. usr/appl/temp/file1.txt) and I need to create one new blank file say “file_count.txt” in the same script itself. Then the new file <file_count.txt> should store all the 7 filenames and... (1 Reply)
Discussion started by: pr293
1 Replies

8. Shell Programming and Scripting

How to Remove the new line character inbetween a record

I have a file, in which a single record spans across multiple lines, File 1 ==== 14|\n leave request \n accepted|Yes| 15|\n leave request not \n acccepted|No| I wanted to remove the '\n charecters. I used the below code (foudn somewhere in this forum) perl -e 'while (<>) { if... (1 Reply)
Discussion started by: machomaddy
1 Replies

9. Shell Programming and Scripting

How to remove duplicated lines?

Hi, if i have a file like this: Query=1 a a b c c c d Query=2 b b b c c e . . . (7 Replies)
Discussion started by: the_simpsons
7 Replies

10. Shell Programming and Scripting

Join files, omit duplicated records from one file

Hello I have 2 files, eg more file1 file2 :::::::::::::: file1 :::::::::::::: 1 fromfile1 2 fromfile1 3 fromfile1 4 fromfile1 5 fromfile1 6 fromfile1 7 fromfile1 :::::::::::::: file2 :::::::::::::: 3 fromfile2 5 fromfile2 (4 Replies)
Discussion started by: CHoggarth
4 Replies
PGN-EXTRACT(1)						      General Commands Manual						    PGN-EXTRACT(1)

NAME
pgn-extract - a Portable Game Notation (PGN) extractor SYNOPSIS
pgn-extract [flags] file.pgn [file.pgn ...] DESCRIPTION
This manual page briefly documents pgn-extract. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. OPTIONS
-7 Output the seven tag roster for each game. Other tags, apart from FEN and possible ECo/Opening/Variation) are lost. -aoutputfile The file to which extracted games are to be appended. See -o flag for overwriting an existing file. -Aargsfile Read the program's arguments from argsfile. -b[elu]num Restricted bounds on the number of moves in a game; lnum set a lower bound of `num' moves, unum set an upper bound of `num' moves, otherwise num (or enum) means equal-to `num' moves. -cfile[.pgn] Use file as a list of check files for duplicates. -C Don't include comments in the output. Ordinarily these are retained. -dduplicatefile The file to which duplicate extracted games are to be written. -D Don't output duplicate extracted game scores. -eECO_file Perform ECO classification of games. The optional ECO_file should contain a PGN format list of ECO lines. Default is to use /usr/share/pgn-extract/eco.pgn as ECO_file. -E[123] Split output into separate files according to ECO. E1: Produce files from ECO letter, A.pgn, B.pgn, etc. E2: Produce files from ECO letter and first digit, A0.pgn, etc. E3: Produce files from full ECO code, A00.pgn, A01.pgn, etc. All files are opened in append mode. -ffile_list The file file_list contains the list of PGN files to be searched - one per line. -F Output a FEN string comment of the final game position. -h Print an abbreviated list of help. -h1 Print further help. -? Print an abbreviated list of help. -llogfile Create a new logfile for the diagnostics rather than using stderr. -Llogfile Append all diagnostics to logfile rather than using stderr. -noutputfile Write all valid games not otherwise output to outputfile. -N Don't include NAGs in the output. Ordinarily these are retained. -ooutputfile The file to which extracted games are to be written. Any existing contents of the file are lost (see -a flag). -P Don't match permutations of the textual variations (-v). -r Report any errors but don't extract. -Rtagorder Use the tag ordering specified in the file tagorder. -s Silent mode don't report each game as it is extracted. -S Use a simple soundex algorithm for tag matches. If used, this option must precede the -t or -T options. -ttagfile File of player, date, or result, extraction criteria. -Tcriterion Player, date, or result, extraction criteria. -U Don't output games that only occur once. (Use with -d to identify duplicates in multiple files.) -vvariations The file variations contains the textual lines of interest. -V Don't include variations in the output. Ordinarily these are retained. -wwidth Set width as an approximate line width for output. -W Don't rewrite the moves into Standard Algebraic Notation. -W[cm|epd|san|elalg|lalg|halg] Specify the output format to use. Default is san: standard algebraic notation. cm is ChessMaster format. epd is EPD format. lalg is long algebraic. halg is hyphenated long algebraic. elalg is enhanced long algebraic. Use -Wsan[PNBRQK] for language specific output, e.g., use -WsanBSLTDK for German. Similarly for -Welalg[PNBRQK]. -xvariations The file variations contains the lines resulting in positions of interest. -zendings The file endings contains the end positions of interest. -Z Use the file virtual.tmp as an external hash table for duplicates. Use when MallocOrDie messages occur with big datasets. -#num Output num games per file, to files named 1.pgn, 2.pgn, etc. AUTHOR
Pgn-extract was written by David Barnes <D.J.Barnes@ukc.ac.uk>. This manual page was written by Peter van Rossum <petervr@debian.org>, for the Debian GNU/Linux system. March 11, 2001 PGN-EXTRACT(1)
All times are GMT -4. The time now is 05:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy