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
indxbib(1)							   User Commands							indxbib(1)

NAME
indxbib - create an inverted index to a bibliographic database SYNOPSIS
indxbib database-file... DESCRIPTION
indxbib makes an inverted index to the named database-file (which must reside within the current directory), typically for use by look- bib(1) and refer(1). A database contains bibliographic references (or other kinds of information) separated by blank lines. A bibliographic reference is a set of lines, constituting fields of bibliographic information. Each field starts on a line beginning with a `%', followed by a key-letter, then a blank, and finally the contents of the field, which may continue until the next line starting with `%'. indxbib is a shell script that calls two programs: /usr/lib/refer/mkey and /usr/lib/refer/inv. mkey truncates words to 6 characters, and maps upper case to lower case. It also discards words shorter than 3 characters, words among the 100 most common English words, and num- bers (dates) < 1000 or > 2099. These parameters can be changed. indxbib creates an entry file (with a .ia suffix), a posting file (.ib), and a tag file (.ic), in the working directory. FILES
/usr/lib/refer/mkey /usr/lib/refer/inv x.ia entry file x.ib posting file x.ic tag file x.ig reference file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWdoc | +-----------------------------+-----------------------------+ SEE ALSO
addbib(1), lookbib(1), refer(1), roffbib(1), sortbib(1), attributes(5) BUGS
All dates should probably be indexed, since many disciplines refer to literature written in the 1800s or earlier. indxbib does not recognize pathnames. SunOS 5.10 14 Sep 1992 indxbib(1)
All times are GMT -4. The time now is 12:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy