12-10-2012
Quote:
Originally Posted by
ida1215
Hi balajesuri, thanks for your quick reply. yes, I need the evaluated cumulative frequency. There's a small glitch though, it doesn't print the first row and as such the last cumulative frequency value is a little off to 1.
When you say first row, you mean "obs freq cumFreq", right? If so, the perl code does print this.
Quote:
Originally Posted by
ida1215
And also quick question what does $. means? thanks again
In perl, scalar variables begin with a "$" symbol. That's the language grammar. Likewise, perl recognizes an array identifier by "@" as in
@myArrVar a hash by "%" as in
%myHash.
Last edited by balajesuri; 12-10-2012 at 02:49 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Ez all!
I have a question how to decrypt text uses letter frequency analysis. I have code which count the letters, but what i need to do after that. Can anybody help me to write a code. VERY NEEDED! My code now:
#!/usr/bin/awk -f
BEGIN { FS="" }
{
for (i=1; i <= NF; i++) {
if ($i... (4 Replies)
Discussion started by: SerJel
4 Replies
2. Shell Programming and Scripting
Hi,
I have a file containing the frequency's of an element sorted in ascending order. The file looks something like this:
#Element Frequency
1 1
2 1
3 1
4 1
5 1
6 ... (5 Replies)
Discussion started by: sajal.bhatia
5 Replies
3. Shell Programming and Scripting
Dear all,
i need your help on this. There is a text file, i need to count word frequency for each word with frequency >40 in each line of file and output it into another file with columns like this:
word1,word2,word3, ...wordn
0,0,1
1,2,0
3,2,0 etc -- each raw represents... (13 Replies)
Discussion started by: irrevocabile
13 Replies
4. Shell Programming and Scripting
Input file:
#read_1
AWEAWQQRZZZQWQQWZ
#read_2
ZZAQWRQTWQQQWADSADZZZ
#read_3
POGZZZZZZADWRR
.
.
Desired output file:
#read_1 3
#read_1 1
#read_2 2
#read_2 3
#read_3 6
.
. (3 Replies)
Discussion started by: perl_beginner
3 Replies
5. Shell Programming and Scripting
I would like to extract a number from $0 and calculate if it can be devided by 25. Though the number can also be less then 25 or bigger than 100. How do i extract the number and how can the integer be calculated?
String:
"all_results">39</span>I am looking for the number between "all_results"> ... (5 Replies)
Discussion started by: sdf
5 Replies
6. Shell Programming and Scripting
Hi, I am working with files containing 2 columns in which i need to come up with the frequency/count of values in col. 2 falling within specifics binned values of col. 1. the contents of a sample file is shown below:
15 12.5
15 11.2
16 0.2
16 1.4
17 1.6
18 4.5
17 5.6
12 8.6
11 7.2
9 ... (13 Replies)
Discussion started by: ida1215
13 Replies
7. Shell Programming and Scripting
Hi All,
IS there any 'awk' way to manipulate following data?
Fruit Date Count
Apple 20/08/2011 5
Apple 27/08/2011 7
Apple 05/09/2011 11
Apple 12/09/2011 3
Apple 19/09/2011 25
.
.
.
.
Orange 20/08/2011 9
Orange 27/08/2011 20
Orange 27/08/2011 7
Orange 05/09/2011 15
Orange... (3 Replies)
Discussion started by: aniketdixit
3 Replies
8. Shell Programming and Scripting
Hi All,
I have the following time stamp data in 2 columns
Date TimeStamp(also with milliseconds)
05/23/2012 08:30:11.250
05/23/2012 08:30:15.500
05/23/2012 08:31.15.500
.
.
etc
From this data I need the following output.
0.00( row1-row1 in seconds)
04.25( row2-row1 in... (5 Replies)
Discussion started by: ks_reddy
5 Replies
9. Shell Programming and Scripting
I need to find the average from a file like:
data => BW:123 M:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0'
data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0'
data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0'
data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0'
data => BW:123 N:30 RTD:0 1... (4 Replies)
Discussion started by: Slagle
4 Replies
10. Shell Programming and Scripting
For the data
I would like to parse down and for each parsing
I want a cumulative averaging, stored in an array
that can be output.
I.e.
546/NR = 546
(546+344)/NR=(546+344)/2 = etc.
For N record input I want N values of the average (a block
averaging effectively)
Any... (3 Replies)
Discussion started by: chrisjorg
3 Replies
LEARN ABOUT CENTOS
cpupower-frequency-set
CPUPOWER-FREQUENCY-SET(1) cpupower Manual CPUPOWER-FREQUENCY-SET(1)
NAME
cpupower frequency-set - A small tool which allows to modify cpufreq settings.
SYNTAX
cpupower [ -c cpu ] frequency-set [options]
DESCRIPTION
cpupower frequency-set allows you to modify cpufreq settings without having to type e.g. "/sys/devices/system/cpu/cpu0/cpufreq/scal-
ing_set_speed" all the time.
OPTIONS
-d --min <FREQ>
new minimum CPU frequency the governor may select.
-u --max <FREQ>
new maximum CPU frequency the governor may select.
-g --governor <GOV>
new cpufreq governor.
-f --freq <FREQ>
specific frequency to be set. Requires userspace governor to be available and loaded.
-r --related
modify all hardware-related CPUs at the same time
REMARKS
By default values are applied on all cores. How to modify single core configurations is described in the cpupower(1) manpage in the --cpu
option section.
The -f FREQ, --freq FREQ parameter cannot be combined with any other parameter.
FREQuencies can be passed in Hz, kHz (default), MHz, GHz, or THz by postfixing the value with the wanted unit name, without any space (fre-
quency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).
On Linux kernels up to 2.6.29, the -r or --related parameter is ignored.
FILES
/sys/devices/system/cpu/cpu*/cpufreq/
/proc/cpufreq (deprecated)
/proc/sys/cpu/ (deprecated)
AUTHORS
Dominik Brodowski <linux@brodo.de> - author
Mattia Dongili<malattia@gmail.com> - first autolibtoolization
SEE ALSO
cpupower-frequency-info(1), cpupower(1)
0.1 CPUPOWER-FREQUENCY-SET(1)