Search Results

Search: Posts Made By: nica
5,932
Posted By nica
Thanks Alister, Instead of using cronjob,...
Thanks Alister,

Instead of using cronjob, which schedule a task/script to be running based on pre-determined time, I want to restart the apache based on memory consumption. So, for example, if ...
5,932
Posted By nica
Script to restart apache when running out of memory
Hi,

I have a problem with running out of memory in my Ubuntu web server (4GB RAM) because many people try to access my server.

I used to restart manually my apache server to clear out the...
Forum: Programming 02-01-2010
3,094
Posted By nica
Simulation using C/C++ and Java
Hi,

I'm just start to learning simulate a network protocol using C/C++ and Java from scratch.
Actually, I want to make two nodes can communicate using TCP and UDP protocol, for example http...
1,692
Posted By nica
need an AWK code: put in parallel & average them
Hi,

I have a data as follow:

1, 1.0 4.00
1, 2.0 4.00
1, 3.0 4.43
1, 4.0 4.40
1, 5.0 4.48
2, 1.0 0.00
2, 2.0 4.40
2, 3.0 3.40
2, 4.0 4.40
2, 5.0 ...
2,605
Posted By nica
Thanks kshji & danmero :)
Thanks kshji & danmero :)
2,605
Posted By nica
Changing the sequence number
Hi,

I have a data as follow:

1 400
2 239
3 871
4 219
5 543
6 ...
7 ...
.. ...
.. ...
99 818
100 991

I want to replace the sequence number (column 1) that start...
4,794
Posted By nica
Thanks summer_cherry, for perl & nawk code :b:
Thanks summer_cherry, for perl & nawk code :b:
4,794
Posted By nica
Hi Franklin52, Your code is work!:b: ...
Hi Franklin52,

Your code is work!:b:

Thanks so much.....:)
4,794
Posted By nica
paste each 10 lines of single column to several column
Hi,

I need to paste each 10 lines of single column to several columns.
Please, can anyone tell me how to write in awk?

Input File:

22
34
36
12
17
19
15
11
89
99
56
38
29
8,415
Posted By nica
Thanks summer_cherry, But your code does not...
Thanks summer_cherry,

But your code does not work what I expected.

Since V2 is a counter, I just want to take the highest count of V2.
for example:

1,1,1,2,3,1,2,1,1,1 = 1,1,3,2,1,1,1...
8,415
Posted By nica
Hi, I have another request.. here, V2...
Hi,

I have another request..

here, V2 is a counter
I want to match V2 value with the V1 value with the same time series (t1) before V2 counter get reset to "1"..
e.g. 1,2,3,1 ---> I want to...
8,415
Posted By nica
Hi vgersh99, Thanks for the code....:)
Hi vgersh99,

Thanks for the code....:)
8,415
Posted By nica
calculate the average of time series data using AWK
Hi,

I have two time series data (below) merged into a file.
t1 and t2 are in unit of second

I want to calculate the average of V1 every second and count how many times "1" in V2 is occur...
4,711
Posted By nica
Hi vgersh99, Now, your code is work ...
Hi vgersh99,

Now, your code is work

Thanks for your help....
4,711
Posted By nica
Hi, I have try your new code but the output...
Hi,

I have try your new code but the output does not show the average of each line unless only for the first line show the correct average

Input File:
60 30 23 66 42 --->...
4,711
Posted By nica
Thanks vgersh99, Actually, I have written...
Thanks vgersh99,

Actually, I have written the code very similar to your code but it is not produce the desired output.

here, the output of your code:
44.2
82.0
119.2
173.6
awk: cmd....
4,711
Posted By nica
Average number of each line
Hi,

Please, can anyone help me how to get the average number of each line using awk

Input File:
60 30 23 66 42
32 48 49 27 33
44 22 88 11 21
73 24 38 66 71


Desired...
6,510
Posted By nica
Sorry fpmurphy, Your code is work !!:b:...
Sorry fpmurphy,

Your code is work !!:b: Excellent!!!
I just made mistypo on code...(that's my silly mistake :o)

Thanks...many thanks to all of you who help me

Regard,
6,510
Posted By nica
Thanks fpmurphy, Your code did not print out...
Thanks fpmurphy,

Your code did not print out anything..

Regard
6,510
Posted By nica
Thanks Franklin52, Ok, I think,...
Thanks Franklin52,

Ok, I think, distinguishes by field confuse us. (Actually, we dont need to distinguishes by field, this distinguishes is only separate the consecutive occurrence and non...
6,510
Posted By nica
Thanks Franklin52, Yes, I have tried your...
Thanks Franklin52,

Yes, I have tried your solution but the code did not work what I expected.


$ cat file
000 X0X0 000 X0XX0XXX0XX0 0000 XXXXX0 00
000 X0X0 0X0 X0XX0XXX0XX0 0000...
6,510
Posted By nica
Thanks All for your help... But all code...
Thanks All for your help...

But all code which you posted does not work as what I expected. Please, see my desired output below.

I try to explain again more clearly..

If an X or consecutive...
6,510
Posted By nica
Hi Summer Cherry, Thanks for the Perl...
Hi Summer Cherry,

Thanks for the Perl Code..:b:

Do you have any idea how to write it in Awk?
FYI, my Input Data range is displayed line by line.

Thanks:)
42,430
Posted By nica
Calculate the Median, first quartile and third quartile using AWK
Hi all,

I have a data range as follow:

28
33
42
12
9
68
81
55
6
47

Since I want to create Box & Whisker Plot, I need to calculate the median, first quartile and third quartile of...
6,510
Posted By nica
Hi Franklin52, Thanks for the quick...
Hi Franklin52,


Thanks for the quick respond..


Ok, I try to explain more details....



If every X followed by 0 is count as occurrence 1
e.g: X0 , XX0, XXX0, XXXX0, so on... count as...
Showing results 1 to 25 of 26

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