Sponsored Content
Full Discussion: Remove repeated letter words
Top Forums Shell Programming and Scripting Remove repeated letter words Post 303007267 by crepe6 on Tuesday 14th of November 2017 06:39:49 PM
Old 11-14-2017
Remove repeated letter words

Hi,
I have this text file with these words and I need help with removing words with repeated letter from these lines.

Code:
      1 ama
      5 bib
     29 bob
      2 bub
      5 civic
      2 dad
     10 deed
      1 denned
    335 did
      1 eeee
      1 eeeee
      2 eke
      8 ere
      4 eve
    116 eye
      1 gig
      2 hah
      1 huuh
      3 III
      1 kraark
     12 level
      1 lil
      6 maam
      2 madam
      1 mem
      1 minim
     13 non
      8 noon
     11 nun
      1 pap
      5 peep
      1 pip
      2 poop
      9 pop
      2 pup
      1 rever
      1 sas
     10 sees
      1 ses
      1 solos
      1 tattarrattat
      1 tot
      1 tut
      1 txt
      2 wow

remove the words like 'eeee' and 'III'

i know there is a way of using sed to remove specific lines, I think it's along the lines of 's/'eeee/' but i want a way to remove any repeated letters using one command.

any help would be great thank you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to find capital letter names in a file without finding words at start of sentence

Hi, I want to be able to list all the names in a file which begin with a capital letter, but I don't want it to list words that begin a new sentence. Is there any way round this? Thanks for your help. (1 Reply)
Discussion started by: kev269
1 Replies

2. UNIX for Advanced & Expert Users

How to filter the words, if that word contains the expected letter

Hi, I am trying to filter the words from a file which contain 'abc'. But I am unable to. Could any one help me. For eg: The file contents are 123ab 12hnj1 123abc456 123cgbcahjkf23 23134abchfhj43 gc32abc abc1 2abc3 sd uiguif fhwe 21242 uh123 jkcas124d123 u3hdbh23u ffsd8 Output... (3 Replies)
Discussion started by: venu_eie
3 Replies

3. Shell Programming and Scripting

Help in counting the no of repeated words with count in a file

Hi Pls help in solving my doubt.Iam having file like below file1.txt priya jenny jenny priya raj radhika priya bharti bharti Output required: I need a output like count of repeated words with name for ex: priya 3 jenny 2 (4 Replies)
Discussion started by: bha148
4 Replies

4. Shell Programming and Scripting

delete repeated strings (tags) in a line and concatenate corresponding words

Hello friends! Each line of my input file has this format: word<TAB>tag1<blankspace>lemma<TAB>tag2<blankspace>lemma ... <TAB>tag3<blankspace>lemma Of this file I need to eliminate all the repeated tags (of the same word) in a line, as in the example here below, but conserving both (all) the... (2 Replies)
Discussion started by: mjomba
2 Replies

5. Shell Programming and Scripting

Script to compare 2 words (first and last letter only)

Hello, I need a script to do the following: I have a file filled of lines like: valu -> value confirmaton -> confirmation I need a script to compare the first and last letters of the words, for example for the line: valu -> value compare "v" to "v" and "u" to "e" and print the line... (7 Replies)
Discussion started by: bojomojo
7 Replies

6. Shell Programming and Scripting

remove brackets and put it in a column and remove repeated entry

Hi all, I want to remove the remove bracket sign ( ) and put in the separate column I also want to remove the repeated entry like in first row in below input (PA156) is repeated ESR1 (PA156) leflunomide (PA450192) (PA156) leflunomide (PA450192) CHST3 (PA26503) docetaxel... (2 Replies)
Discussion started by: manigrover
2 Replies

7. Shell Programming and Scripting

Make all words begin with capital letter?

I need to use bash to convert sentences where all words start with a small letter into one where all words start with a capital letter. So that a string like: are utilities ready for hurricane sandy becomes: Are Utilities Ready For Hurricane Sandy (10 Replies)
Discussion started by: locoroco
10 Replies

8. UNIX for Dummies Questions & Answers

Delete all words not containing letter /s/

I have a word file that looks like: pens binder spiral user I want to delete all the words without the letter /s/, so output looks like: pens spiral user I tried using sed: sed '//d' infile.txt > out.txt (5 Replies)
Discussion started by: pxalpine
5 Replies

9. Shell Programming and Scripting

Find repeated word and take sum of the second field to it ,for all the repeated words in awk

Hi below is the input file, i need to find repeated words and sum up the values of it which is second field from the repeated work.Im trying but getting no where close to it.Kindly give me a hint on how to go about it Input fruits,apple,20,fruits,mango,20,veg,carrot,12,veg,raddish,30... (11 Replies)
Discussion started by: 100bees
11 Replies

10. Shell Programming and Scripting

Counting all words that start with a capital letter in a string using python dictionary

Hi, I have written the following python snippet to store the capital letter starting words into a dictionary as key and no of its appearances as a value in this dictionary against the key. #!/usr/bin/env python import sys import re hash = {} # initialize an empty dictinonary for line in... (1 Reply)
Discussion started by: royalibrahim
1 Replies
NBIBFIND(1)						      General Commands Manual						       NBIBFIND(1)

NAME
nbibfind - find bibliography entries for BibTeX or NbibTeX SYNOPSIS
nbibfind [-terse|-full|-bib] query [bibname...] DESCRIPTION
nbibfind searches for BibTeX entries using the same query algorithm as NbibTeX. If the optional list of bibnames is given, it searches only those bibliographies; otherwise, it searches all bibliographies on the user's BIBINPUTS (or on the standard system path). The lan- guage of query is that of nbibtex(1). OPTIONS
-terse Print a one-line summary of each matched entry (the default). -full Print a longer summary of each matched entry, including full authors, year, and title, possibly spread over multiple lines. -bib Print each entry in a form suitable for including in a .bib file. EXAMPLES
nbibfind author=knuth:series=art-programming:volume=2 nbibfind knuth:seminumerical personal.bib nbibfind harper-moggi:phase nbibfind :essence-algol nbibfind :essence-functional QUERY LANGUAGE
The query language is that of nbibtex(1). A query consists of a sequence of one or more constraints separated by colons. A constraint may be empty. A nonempty constraint is of the form key=words, where key is the name of a field in the NbibTeX entry and words is a sequence of one or more words separated by dashes. The contraint is satisfied if every word in words is found in the field named by key. (The key may also be [type], which matches agains the type of the entry, or *, which looks for words in any field.) As a convenience, keys may be defaulted in up to three constraints. In the first constraint, the default key is author. In the second constraint, the default key is year if words is all digits, and is title otherwise. In the third constraint, the default key is year if words is all digits, and is [type] otherwise. To match a word in words, nbibfind uses the Boyer-Moore string-matching algorithm, so longer words are usually faster. ENVIRONMENT
For .bib files, nbibfind uses the BIBINPUTS environment variable if that is set, otherwise the default. For details of the searching, see tex(1) and kpsewhich(1). SEE ALSO
nbibtex(1), latex(1), tex(1), kpsewhich(1), bibtex(1). Leslie Lamport, LaTeX - A Document Preparation System, Addison-Wesley, 1985, ISBN 0-201-15790-X. AUTHOR
Norman Ramsey, Harvard University. 4 May 2006 NBIBFIND(1)
All times are GMT -4. The time now is 09:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy