Sponsored Content
Top Forums Shell Programming and Scripting Remove duplicate line on condition Post 302615947 by jamie_123 on Friday 30th of March 2012 09:41:45 AM
Old 03-30-2012
@ranga- there seems to be a problem-
When there is an input like this-
Code:
5 bla bla  1 
9 bla bla 3 
78 bla bla 1 
83 bla bla 2 
130 bla bla 1 
187 bla bla 0

The output is-

Code:
9 bla bla 3 
5 bla bla 1 
187 bla bla 0 
83 bla bla 2

In cases where there are no consecutive repetitions then there should be no change to the ouput.
Any ideas???

@ yazu- for the same input for your script I just get this-

Code:
5 bla bla 1

Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remove Duplicate line

Hi, I have a scenario here where I have created a flatfile with the below mentioned information. File as you can see is dispalyed in three columns 1st column is FileNameString 2nd column is Report_Name (this has spaces) 3rd column is Flag Result file needed is, removal of duplicate... (1 Reply)
Discussion started by: Student37
1 Replies

2. UNIX for Dummies Questions & Answers

Remove duplicate entry in one line

Can anyone help me how can i print only the unique entry in a line? MI_AP MI_AP MI_CM MI_MF RC_NAP MBS_AP SF_RAN MBS_AP NT_CAR so that it will on output the one unique entry per line. MI_AP MI_CM MI_MF RC_NAP MBS_AP SF_RAN NT_CAR I can't find the same situation on the knowledge... (5 Replies)
Discussion started by: kharen11
5 Replies

3. Shell Programming and Scripting

remove duplicate words in a line

Hi, Please help! I have a file having duplicate words in some line and I want to remove the duplicate words. The order of the words in the output file doesn't matter. INPUT_FILE pink_kite red_pen ball pink_kite ball yellow_flower white no white no cloud nine_pen pink cloud pink nine_pen... (6 Replies)
Discussion started by: sam_2921
6 Replies

4. Shell Programming and Scripting

remove of duplicate line from a file

I have a file a.txt having content like deepak ram sham deepram sita kumar I Want to delete the first line containing "deep" ... I tried using... grep -i 'deep' a.txt It gives me 2 rows...I want to delete the first one.. + need to know the command to delete the line from... (5 Replies)
Discussion started by: saluja.deepak
5 Replies

5. Shell Programming and Scripting

remove duplicate lines with condition

hi to all Does anyone know if there's a way to remove duplicate lines which we consider the same only if they have the first and the second column the same? For example I have : us2333 bbb 5 us2333 bbb 3 us2333 bbb 2 and I want to get us2333 bbb 10 The thing is I cannot... (2 Replies)
Discussion started by: vlm
2 Replies

6. UNIX for Dummies Questions & Answers

Remove Duplicate Two Line Pairs?

So I have a bunch of files that look like this >gi|33332323 MMKCRGVIMVVEKVMKRDGRIVPFDESRIRWAVQ--- >gi|45235353 MMKCR----VEKMRDVFFDESIRWAVQ They go on...sequences are much longer but all in two line (fasta) format. I want to remove duplicate pairs of ID(GI) number and sequence. I tried... (12 Replies)
Discussion started by: bakere19
12 Replies

7. Shell Programming and Scripting

Remove duplicate entries from the same line

Hello, I have a file which have several duplicate entries on the same line: File ID source 1 GM GF GM 2 GM GF GM GF GM GF GM GF GM GF 3 GM GF GM SF GM GF GM SF 4 FF FF FF FF 5 FF GM FF ... (2 Replies)
Discussion started by: nans
2 Replies

8. Shell Programming and Scripting

Remove duplicate line starting with a pattern

HI, I have the below input file /* ----------------- cmdsDlyStartFWJ -----------------*/ UNIX_JOB CMDS065J RUN ANY CMDNAME sleep 5 AGENT CMDSHP USER proddata RUN MON,TUE,WED,THU,FRI DELAYSUB 02:00 /* "Triggers daily file watcher jobs" */ ENVAR... (5 Replies)
Discussion started by: varun22486
5 Replies

9. Shell Programming and Scripting

Remove duplicate values with condition

Hi Gents, Please can you help me to get the desired output . In the first column I have some duplicate records, The condition is that all need to reject the duplicate record keeping the last occurrence. But the condition is. If the last occurrence is equal to value 14 or 98 in column 3 and... (2 Replies)
Discussion started by: jiam912
2 Replies

10. Shell Programming and Scripting

Remove sections based on duplicate first line

Hi, I have a file with many sections in it. Each section is separated by a blank line. The first line of each section would determine if the section is duplicate or not. if the section is duplicate then remove the entire section from the file. below is the example of input and output.... (5 Replies)
Discussion started by: ahmedwaseem2000
5 Replies
eFTE(1) 						      General Commands Manual							   eFTE(1)

NAME
efte - Text editor SYNOPSIS
efte [[options] files ...] vefte [[options] files ...] nefte [[options] files ...] DESCRIPTION
This manual page documents briefly the efte. This manual page was written for the Debian GNU/Linux distribution (but may be used by others), because the original program does not have a manual page. Instead, it has documentation in html format; see below. efte is a powerful text editor which closely resembles Borlands programming editors for M$-DOS, but is far more flexible and configurable. OPTIONS
efte uses a command line syntax, which is a little bit different from most of Debian GNU/Linux apps. -h -? --help Help on command line options. -! Ignore any external configuration file and use internal configuration. -l<line>[,<column>] Go to line (and column) in next file on command line. -#<line>[<,column>] Same as -l. Do not use this option. -m[<mode>] Set mode for next files to <mode>. If just plain -m, then use default mode. -C[<.cnf>] Use specified configuration file (compiled). Plain -C does the same as -!. -D[<.dsk>] Load/save desktop from file <.dsk>. If no argument, disable desktop load/save. -H[<.his>] Load/save history from file <.his>. If no argument, disable history load/save. -T<tagfile> Load 'tagfile' at startup. -t<tag> Lookup tag 'tag' and display file containing it. -- The rest of the arguments are not options, but filenames. -+ The next argument is not an option even if starting with a '-'. Useful when loading files that begin with a -. -noxmb Do not use XMB functions in xefte - useful if you have incorrect locales and you want to use just english fonts. -font Select XWindow font to use with xefte. See VIOFONT also. ENVIRONMENTAL VARIABLES
This is list of variable which might change behavior of some internals of efte. VIOFONT - select font used by xefte ISOCONSOLE - when set, vefte is usign ascii symbols to draw tables. This is useful when iso latin charset is used on console. EXAMPLES
efte -mBIN /usr/bin/vefte load /usr/bin/vefte in BIN mode efte -mBIN -+ -bla- load file -bla- in BIN mode efte -l100,30 win.c go to (100,30) in win.c efte window.cpp load file window.cpp efte -- -1 -2 -3 -4 -5 -6 load files -1, -2, -3, -4, -5, -6 efte -D -H efte.dsk efte.his disable desktop and history loading and saving and load files efte.dsk and efte.his FILES
~/.efterc /usr/local/etc/efte/system.fterc /etc/efte/system.fterc Default configuration files. Includes all keybindings and menus compiled with cefte(1) from config files in /usr/share/doc/efte/config- example.tar.gz. SEE ALSO
cefte(1), /usr/share/doc/efte/contents.html AUTHORS
This manual page was written by Riku Voipio and Zdenek Kabelac <riku.voipio@iki.fi> <kabi@debian.org> for the Debian GNU/Linux system. DATE
18 Nov 1999 eFTE(1)
All times are GMT -4. The time now is 08:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy