Ha, ha! Another classic example of changing requirements. Ok, here's some light:
if($. == 1) {print; next} ==> This part of the code checks if line in consideration is line #1 and if so prints the line as-is and proceeds to next line. This is because, from your initial sample in post #1, first line is the header line (obs freq (1/n) cumfreq).
Here's one to suit your requirement from post #5:
This User Gave Thanks to balajesuri For This Post:
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)
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)
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)
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)
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)
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)
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)
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 DEBIAN
fm
FM(1) General Commands Manual FM(1)NAME
fm - control frequency, volume, mute/unmute of FM radio card
SYNOPSIS
fm [ -h ] [ -o ] [ -q ] [ -d device ] [ -t tuner ] [ -T none | forever | time ] on | off | + | - | freq [ volume ]
DESCRIPTION
fm is a program to control the frequency, volume, and mute/unmute state of an FM radio card, using the video4linux interface introduced in
2.1.x series Linux kernels.
OPTIONS
-h Print a usage message to standard output, and exit.
-o Ignore frequency range limits of card. Use if you suspect that the card supports a wider frequency range than its driver believes.
-q Quiet mode. Keeps information on station and volume from being printed on standard output.
-d device
Sets device as the device to tune. The default is /dev/radio0.
-t tuner
Sets tuner as the tuner on the selected device to adjust. The default is tuner 0. Most radio devices have only a single tuner.
-T none | forever | time
After tuning, sleep for the time specified or forever. Time is specified in seconds by default. A suffix of m indicates minutes, h
indicates hours, or d indicates days.
The -T option is useful with radio card drivers that only maintain the tuner settings while the tuner's file descriptor remains
open. Try using this option if running fm ordinarily produces only a single "pop" from your speakers.
freq Frequency to tune the radio to, in MHz. For instance, 88.9 specifies a frequency of 88.9 MHz. AM tuner values are also specified
in MHz; for instance, 530 kHz would be specified as .530.
on Turn the radio on (unmute).
off Turn the radio off (mute).
volume Specify the desired volume, in percent. Not all radio devices support volume control.
+ Increase the current volume.
- Decrease the current volume.
CONFIGURATION
fm reads $HOME/.fmrc, if it exists, to obtain default settings. Each line may take one of the following forms:
VOL percent
Specifies default volume (default: 12.5%).
INCR percent
Volume increment used for + and - options (default: 10%).
TIME Default sleep time (default: none).
All other lines are ignored.
SEE ALSO
Additional documentation:
/usr/share/doc/fmtools/README
The fmtools homepage:
http://benpfaff.org/fmtools
AUTHORS
Russell Kroll <rkroll@exploits.org>, now maintained by Ben Pfaff <blp@cs.stanford.edu>. Sleep time feature contributed by Dave Ulrick <d-
ulrick@insightbb.com>. This manpage written by Ben Pfaff.
fm 1.0.2 FM(1)