Search Results

Search: Posts Made By: khaled79
4,250
Posted By khaled79
Average word length
If i use
wc -m filename it will generate the number of characters and

wc -w filename

will generate number of words
if i used this info by dividing number of characters/number of words
...
Forum: Programming 11-09-2013
2,957
Posted By khaled79
Read text from file and print each character in separate line
performing this code to read from file and print each character in separate line
works well with ASCII encoded text


void
preprocess_file (FILE *fp)
{
int cc;
for (;;)
{ cc =...
3,285
Posted By khaled79
Thanks the problem of top words has been...
Thanks

the problem of top words has been solved by


grep -Ewo "[[:alpha:]]""{2,}" education.txt | sort | uniq -c | sort -k1,1rd | head -5>result



output


37 علم
30 إلى...
3,285
Posted By khaled79
Thanks a lot it works for character but...
Thanks a lot
it works for character

but how to find top 30 words and trigraphs (3 letter in same order)?

---------- Post updated at 08:06 PM ---------- Previous update was at 07:41 PM...
3,285
Posted By khaled79
Sorry for that reply :D the input is .txt...
Sorry for that reply :D

the input is .txt file in Arabic language

sample of input txt


عونك اللهم وصلى الله على سيدنا محمد وعلى آله وصحبه وسلم كما ذكره الذاكرون، وكما غفل عن ذكره...
3,285
Posted By khaled79
Thank you I have tried it but it doesn't...
Thank you

I have tried it but it doesn't work
3,285
Posted By khaled79
The text is Arabic text which is not consist of...
The text is Arabic text which is not consist of ABC or abc letters

any help?
1,524
Posted By khaled79
any help?
any help?
1,524
Posted By khaled79
Frequent words and trigraphs in text
Hello all,
how to get the most 30 frequent words in text and the most frequent trigraphs (three character in same order in text )?

note that : the text is none English text (Arabic text)

so...
2,530
Posted By khaled79
How I can sort the result by context only for...
How I can sort the result by context only for ascending sort ?

Thanks
2,530
Posted By khaled79
:b: Thanks a lot
:b: Thanks a lot
2,530
Posted By khaled79
can I sort the output by the character value...
can I sort the output by the character value descending and count descending as secondary ?

Thanks
2,530
Posted By khaled79
where to add it exactly to the last code for...
where to add it exactly to the last code for descending sort?
2,530
Posted By khaled79
descending numeric count Thanks
descending numeric count

Thanks
2,530
Posted By khaled79
Yoda how I can sort the output descending? ...
Yoda

how I can sort the output descending?

Thanks
2,530
Posted By khaled79
Yoda is gives the following output ...
Yoda

is gives the following output


The context is 228 the character is 202 count 1
The context is 211 the character is 200 count 1
The context is 200 the character is 202 count 2
The...
2,530
Posted By khaled79
sample input 195 218 200 225 ...
sample input


195
218
200
225
228
202
32
230



sample output


the context - previous record - is 228 the character - current record - is 202 counts 1 times
the context...
2,530
Posted By khaled79
for the following code for i in 200...
for the following code


for i in 200 202 203
do
SEQ=$[i]
awk -v S="$SEQ" '
m=$0{
getline
if ( $0 == S )
{
N++
}
...
2,530
Posted By khaled79
Yoda what is the meaning of END ? ...
Yoda

what is the meaning of END ?

Thnaks
2,530
Posted By khaled79
Record counter
For the following code


SEQ=200
awk -v S="$SEQ" '

$0 ~ S {
N++
print N
}



' "$1"ascii >"$1"search


N is printed 8002 times as it...
963
Posted By khaled79
Thanks Yoda in this case I need to...
Thanks Yoda

in this case

I need to use the following code which is easier to access pervious or next record as using A[I] , A[i+1] and A[i-1] as following



./ascii <$1 >"$1"ascii ...
963
Posted By khaled79
Dear Yoda what is the expression if want to...
Dear Yoda
what is the expression if want to check for the previous record of the current record not the next record as getline does ?

Thanks
963
Posted By khaled79
Code help
can any body tell me

what is the meaning of the following statements


$0 ~ S {
V = $0
getline
if ( $0 == 199 )
{
...
2,703
Posted By khaled79
Help with script
Hi

the following code if working fine for small file

for i in 200 202 203
do
SEQ=$[i]
gawk -v S="$SEQ" '
{
A[++c] = $1
}
END {
...
15,383
Posted By khaled79
awk with many if statements
Hi

What is the right structure to use awk with multiple If statements

The following code doesn't work

#
awk '
{
A[++c] = $1
}
END {
...
Showing results 1 to 25 of 38

 
All times are GMT -4. The time now is 09:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy