Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Grep words with X doubles only Post 302825189 by alister on Sunday 23rd of June 2013 10:28:11 PM
Old 06-23-2013
To find words that have at least one double but not more than 3:
Code:
sed -n -e '/\(.\)\1/!d; s//&/4; t' -e p

The number can be parameterized with a shell variable.

Regards,
Alister
These 3 Users Gave Thanks to alister For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

long doubles

hey there, i've been trrying to calculate the first 10000 fibonacci numbers using a long double. weird thing is that from a certain value it returns Inf. i'm declaring the vars as long double var; and printing them to a file using: fprintf(filepointer, "%.0Ld\n", var); am i doing... (1 Reply)
Discussion started by: crashnburn
1 Replies

2. Shell Programming and Scripting

find words with grep....

I have a .txt file which contains several lines of text. I need to write a script program using grep or any other unix tool so as to detect part of the text (words) between / / that begin with the symbol ~. For example if somewhere in the text appears a webpage address like... (8 Replies)
Discussion started by: chrisxgr
8 Replies

3. UNIX for Dummies Questions & Answers

Grep Three Words

I have been trying to find files containing the words AAA, BBB and CCC. I tried: grep AAA `grep BBB files*` grep CCC files* but is does not work I tried several ways this is an easy one but I am a dummy, Does anyone can help me? Thanks :( (12 Replies)
Discussion started by: murbina
12 Replies

4. UNIX for Dummies Questions & Answers

search multiple words using grep

Hi frnds i want to desplay file names that should be word1 and word2 ex : i have 10 *.log files 5 files having word1 and word2 5 files having only word1, i have used below command egrep -l 'word1|word2' *.log its giving all 10 files, but i want to display only 5... (20 Replies)
Discussion started by: pb18798
20 Replies

5. UNIX Desktop Questions & Answers

need help writing a program to look for doubles

to determine if two two doubles are equal, we check to see if their absolute difference is very close to zero. . .if two numbers are less than .00001 apart, theyre equal. keep a count field in each record (as you did in p5). once the list is complete, ask the user to see if an element is on... (2 Replies)
Discussion started by: rickym2626
2 Replies

6. Shell Programming and Scripting

grep for words in file

Hi Please can you help me on this: How to grep for multiple words in a file, BUT for every word found output it to a new line. regards FR (8 Replies)
Discussion started by: fretagi
8 Replies

7. Shell Programming and Scripting

grep words from txt

Queue on node in domain description : type : local max message len : 104857600 max queue depth : 5000 queue depth max event : enabled persistent msgs : yes backout threshold : 0 msg delivery seq :... (4 Replies)
Discussion started by: Daniel Gate
4 Replies

8. UNIX for Dummies Questions & Answers

Remove Doubles Without Sort?

Hi! I have concatenated two files which are wordlists, i.e., one word per line. The new file contains some doubles, but I cannot use sort and uniq as I need to keep the sort order that it is already in, which is not alphabetical, and uniq only compares adjacent lines, and the doubles are not on... (15 Replies)
Discussion started by: sudon't
15 Replies

9. Shell Programming and Scripting

How to grep the words with space between?

see I have a text like: 27-MAY 14:00 4 aaa 5.30 0.01 27-MAY 14:00 3 aaa 0.85 0.00 27-MAY 14:00 2 aaa 1.09 0.00 27-MAY 14:00 5 aaa 0.03 0.00 27-MAY 14:00... (3 Replies)
Discussion started by: netbanker
3 Replies

10. Shell Programming and Scripting

Grep only words containing specific string

Hello, I have two files. All urls are space seperated. source http://xx.yy.zz http://df.ss.sd.xz http://09.09.090.01 http://11.22.33 http://canada.xx.yy http://01.02.03.04 http://33.44.55 http://98.87.76.65 http://russia.xx.zz http://aa.tt.xx.zz http://1w.2e.3r.4t http://china.rr.tt ... (4 Replies)
Discussion started by: baris35
4 Replies
MooseX::Role::Parameterized::Meta::Role::ParameterizableUser Contributed Perl DocumentaMooseX::Role::Parameterized::Meta::Role::Parameterizable(3)

NAME
MooseX::Role::Parameterized::Meta::Role::Parameterizable - metaclass for parameterizable roles DESCRIPTION
This is the metaclass for parameterizable roles, roles that have their parameters currently unbound. These are the roles that you use "with" in Moose, but instead of composing the parameterizable role, we construct a new parameterized role (MooseX::Role::Parameterized::Meta::Role::Parameterized) and use that new parameterized instead. ATTRIBUTES
parameterized_role_metaclass The name of the class that will be used to construct the parameterized role. parameters_class The name of the class that will be used to construct the parameters object. parameters_metaclass A metaclass representing this roles's parameters. It will be an anonymous subclass of "parameters_class". Each call to "parameter" in MooseX::Role::Parameters adds an attribute to this metaclass. When this role is consumed, the parameters object will be instantiated using this metaclass. role_generator A code reference that is used to generate a role based on the parameters provided by the consumer. The user usually specifies it using the "role" in MooseX::Role::Parameterized keyword. METHODS
add_parameter $name, %options Delegates to "add_attribute" in Moose::Meta::Class on the "parameters_metaclass" object. construct_parameters %arguments Creates a new MooseX::Role::Parameterized::Parameters object using metaclass "parameters_metaclass". The arguments are those specified by the consumer as parameter values. generate_role %arguments This method generates and returns a new instance of "parameterized_role_metaclass". It can take any combination of three named parameters: arguments A hashref of parameters for the role, same as would be passed in at a "with" statement. package A package name that, if present, we will use for the generated role; if not, we generate an anonymous role. consumer A consumer metaobject, if available. apply Overrides "apply" in Moose::Meta::Role to automatically generate the parameterized role. perl v5.18.2 2013-09-11 MooseX::Role::Parameterized::Meta::Role::Parameterizable(3)
All times are GMT -4. The time now is 01:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy