Filter all the lines with minimum specified length of words of a text file
The content of the sample file to be filtered is :
=============================
============================
And the sample output should look like as given below if I filter sentences more than or equal to 2 (two) words in a line.
Last edited by Don Cragun; 06-11-2015 at 10:46 PM..
Reason: Change HTML tags to CODE tags.
Hi all,
I want to delete all lowercase characters from my file, but only strings of length 7 and more.
For example, how can I go from:
JHGEFigeIGDUIirfyfiyhgfoiyfKJHGuioyrDHG
To:
JHGEFigeIGDUIKJHGuioyrDHG
There should be a trick to add to sed 's///g', but I can't figure it out.... (2 Replies)
hi all,
I have this file with some user data.
example:
$cat myfile.txt
FName|LName|Gender|Company|Branch|Bday|Salary|Age
aaaa|bbbb|male|cccc|dddd|19900814|15000|20|
eeee|asdg|male|gggg|ksgu|19911216|||
aara|bdbm|male|kkkk|acke|19931018||23|
asad|kfjg|male|kkkc|gkgg|19921213|14000|24|... (4 Replies)
Hi Guys,
I was going some trial and error to see if I can find the longest word in a text.
I was using Pipes because they are easier to use in this case.
I was stuck on this for a while so I thought I'll get some help with it.
I tried this code to separate all the words in a text in... (4 Replies)
I have a large file of many pairs of sequences and their headers, which always begin with '>'
I'm looking for help on how to retain only sequences (and their headers) below a certain length. So if min length was 10, output would be
I can filter by length, but I'm not sure how to exclude... (3 Replies)
I have a file that stores data in pairs of lines, following this format:
line 1: header (preceded by ">")
line 2: sequence
Example.txt:
>seq1 name
GATTGATGTTTGAGTTTTGGTTTTT
>seq2 name
TTTTCTTC
I want to filter out the sequences and corresponding headers for all sequences that are less... (2 Replies)
Hi Folks,
I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file.
bash scripting is what i need.
Data.txt
Name OrderID Quantity
Sam 123 300
Jay 342 498
Kev 78 2500
Sam 420 50
Vic 10... (3 Replies)
Hi All
It's me again with another huge txt files. :confused:
What I have:
- I have 33 huge txt files in a folder.
- I have thousands of line in this txt file which contain many the letter "x" in them.
- Some of them have more than one "x" character in the line.
What I want to achieve:... (8 Replies)
Discussion started by: Nexeu
8 Replies
LEARN ABOUT DEBIAN
an
AN(6) Games Manual AN(6)NAME
an - Anagram generator
SYNOPSIS
an [-w] [-c string] [-d dictionary] [-l number_words] [-m word_length] [-u string] [-n number_anagrams] [-h] [-v] [--words] [--contain
string] [--dict dictionary] [--length number_words] [--minimum word_length] [--used string] [--number number_anagrams] [--help] [--ver-
sion] PHRASE
DESCRIPTION
an finds all anagrams which can be made from the letters in PHRASE, using words in the specified dictionary. The default is to use
/usr/share/dict/words.
OPTIONS -w, --words
Print words that the letters in PHRASE can make, then exit.
-c, --contain string
Only print anagrams which contain string.
-d, --dict dictionary
Use dictionary file to find words which the letters in PHRASE can make.
-m, --minimum word_length
Only include word which are at least word_length long.
-u, --used string
Considers that letters in string have already used when analyzing letters in PHRASE. Like --contain but doesn't print out string.
-l, --length number_words
Finds anagrams which have a maximum of number_words words in them. This is very useful when number of anagrams which are output is
large.
-n, --number number_anagrams
Stops after finding number_anagrams anagrams.
-h, --help
Print a usage message on standard output, then exit.
-v, --version
Print version information on standard output, then exit.
EXAMPLE
an -c imp 'Paul Martin'
Finds anagrams for Paul Martin which contain the word imp.
AUTHOR
Paul Martin <pm@debian.org>
THANKS
Richard Jones (richard@deep-thought.org)
- Coding and algorithm design of original version.
Julian Assange (proff@suburbia.net)
- Algorithm design of original version.
Please note that the email addresses for Richard and Julian are from over ten years ago and probably no longer work.
COPYRIGHT
Copyright (c) Paul Martin 2012. All rights reserved.
AN(6)