10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have 13 different words. I need to get permutations like all combinations of this words:
word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12 word13
But the combinations only should be 12 words long.
Is there a fast efficient way to do this? Maybe with linux tool... (1 Reply)
Discussion started by: watcherpro
1 Replies
2. Shell Programming and Scripting
Is there an efficient awk that can count the number of lines that occur in between two tags.
For instance, consider the following text:
<s>
Hi PP -
my VBD -
name DT -
is NN -
. SENT .
</s>
<s>
Her PP -
name VBD -
is DT -
the NN -
same WRT -
. SENT -
</s>
I am interested to know... (4 Replies)
Discussion started by: owwow14
4 Replies
3. Shell Programming and Scripting
Hi All!
can anyone help me with this code?
I want to count words or letters in every line with
if(count>20){else echo $myline}
awk '/<script /{p=1} /<\/script>/{p=0; next}!p' index.html | while read myline; do
echo $myline
done
Thank you !!! (3 Replies)
Discussion started by: sanantonio7777
3 Replies
4. UNIX for Advanced & Expert Users
Hello All,
My requirement is to get test between two words START & END, something like html tags
Eg. Input file:
START
Line1
Line2
Line3
CLOSE
START
Line4
Line5
Line6
END
START
Line7
START
Line8 (7 Replies)
Discussion started by: konerusuneel
7 Replies
5. Shell Programming and Scripting
Hi,
how can we search for a pattren between two words? below are the examples
input
1)select from table_name c1,c2,c3,c4,fn(),fn2(),c5;-->false
2)select from table_name c1,c2,c3,c4;--True
3)select from table
c1,
c2,
c3,
fn(),
c4;-->true
4)select from table_name
c1,
c2,
c3;-->true... (11 Replies)
Discussion started by: manasa_vs
11 Replies
6. Shell Programming and Scripting
Hello,
I want to test if i find the word CACCIA AND idlck in a file, i have to print a message Ok.
For that , i need to user a awk command with a && logical.
Can you help me ?
:confused:
### CACCIA: DEBUT ###
if $(grep -wqi "$2" /etc/passwd); then
&& rm /etc/security/.idlck
... (3 Replies)
Discussion started by: khalidou13
3 Replies
7. Shell Programming and Scripting
So if I have an awk statement that is basically just looking at the NF at if its more than 2, then print out the first 2 words, and all the rest on another line. I know that $1 and $2 are the first two fields, but how would I symbolise telling it to print all the other fields regardless of how many... (11 Replies)
Discussion started by: linuxkid
11 Replies
8. Shell Programming and Scripting
hi
I have posted it earlier but i was unable to put my exact problem.This time posting in parts.
I have a text file which i had transferred to UNIX.It has strings like:
alter table table_name add (column_name);
as well as modify options.
now i need to read the table name between alter... (3 Replies)
Discussion started by: alisha
3 Replies
9. Shell Programming and Scripting
hi sorry, newbie for scripting..
the text file: abcdefghijk%%$%^U^%234454234
I got awk script:
awk ' ($1 == "abcd")
the output only show: abcd
I tried using asterix: awk ' ($1 == "abcd*") but same output abcd only...
how can I get all of the line ?? (6 Replies)
Discussion started by: flekzout
6 Replies
10. Shell Programming and Scripting
Hi all,
Please some help over here. I have a Sales.txt file containing info in blocks for
every sold product in the pattern showed below (only for 2 products).
NEW BLOCK
SALE DATA
PRODUCT SERIAL
79833269999 146701011945004
.Some other data
.Some... (17 Replies)
Discussion started by: cgkmal
17 Replies
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)