Almost giving me the right output, sorry for confusion, in file one, there is no repeating for the field, so it appear only one. Only in file 2 that it can repeat. And the calculation I think is a bit off since line without $ and without 2 numbers after decimal points are treated as invalid, so nothing should be done. Here what I test with the code:
What I think my desired output is:
hi all i am trying to save an awk value into an array in bash:
total=`awk '{sum+=$3} END {print sum}' "$count".txt"`
((count++))
the above statement is in a while loop..
$count is to keep track of file numbers (1.txt,2.txt,3.txt,etc.)
i get the following error:
./lines1:... (1 Reply)
hi i am trying to save the values i extract from a file with the help of awk in a bash shell array.
i have:
exec 10<file2
while read LINE <&10; do
ARRAY1=$(awk '{print $1}' file2)
((count++))
done
echo ${ARRAY1}
it prints just blank lines. file1 has two columns and i... (4 Replies)
hi i am trying to save values in a file in an array in awk..the file is as follows:
0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,
so far i have this:
awk 'BEGIN {RS="\n";FS=","}
{
for(i=1;i<=NR;i++)
{
for(j=1;j<=NF;j++)
{
a=$j;
}
} (4 Replies)
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Hi, im new to shell scripting. i have a query for which i have searched your forums but coulndt get what i need.
i have a file that has two records of exactly the same length and format and they are comma seperated. i need to save the first and the second columns of the input file to 2 different... (11 Replies)
Good day all
I need some helps,
say that I have data like below, each field separated by a tab
DATE NAME ADDRESS
15/7/2012 LX a.b.c
15/7/2012 LX1 a.b.c
16/7/2012 AB a.b.c
16/7/2012 AB2 a.b.c
15/7/2012 LX2 a.b.c... (2 Replies)
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
In the below awk I am splitting $7 on the : and then counting each line or NM_xxxx. If the $1 value is the same for each line then print the $7 that occurs the most with the matching $1 value. The awk seems close but I am not sure what is going on. I included a description as well as to what I... (1 Reply)
I will start with an example of what I'm trying to do and then describe how I am approaching the issue.
File
PS028,005
Lexeme HRS # M #
PhraseType 1(1:1) 7(7)
PhraseLab 501 503
ClauseType ZYq0
PS028,005
Lexeme W # L> # BNH # M #... (17 Replies)
Discussion started by: jvoot
17 Replies
LEARN ABOUT DEBIAN
measerl
MEASERL(1) Voicetronix Telephony Tools MEASERL(1)NAME
measerl - Measure the echo-return loss on Voicetronix telephony hardware
SYNOPSIS
measerl [options]
DESCRIPTION
The measerl utility tests the echo-return loss on the phone line. For hardware that supports it, it can scan through bybrid balance regis-
ter settings to help establish a lower ERL. Having a lower ERL improves DTMF cutthrough and audio quality. The software echo cancellation
needs at least -6dB before it can make a difference.
FXS (station) ports should perform this test using the --nohook option with the handset already off hook and the microphone muted.
FXO (trunk) ports will answer to an incoming call.
A series of tones will be played down the line to determine the ERL in several parts of the audio spectrum. You should avoid creating any
other noise on the line while this test is running, or the results may be skewed.
OPTIONS
The following options are available:
--help, -?
Show summary of options.
--card number
Explicitly select the card to test. Default is card 0.
--port number
Explicitly select the port to test. Default is port 0 of the card being tested.
--nohook
Use this option for testing station (FXS) ports.
--offhook
Take an FXO port off hook immediately. Don't wait for an incoming ring.
--bal1 value
--bal2 value
--bal3 value
Set codec hybrid balance registers. Only for hardware which explicitly supports that.
--ec Enable the echo canceller.
--pg gain
Set codec play gain. Values may range from -12.0 to 12.0.
--rg gain
Set codec record gain. Values may range from -12.0 to 12.0.
--dial port
Dial out another port on the same card.
--dial port number
Dial number from port on the same card.
--scan file start end step
Scan the hybrid balance register settings from start to end in increments of step, recording the results to file. Only for hardware
that explicitly permits setting these registers. Valid values for the start and end are in the range 0 - 255.
--autoscan
Automatically scan the codec balance values.
--handset
Proto handset mode.
--loop Enable software loopback.
--hostecho
Enable the host based echo canceller.
SEE ALSO vpbecho(1), ringstat(1)AUTHOR
Ron Lee, Peter Wintulich, David Rowe, Voicetronix <support@voicetronix.com.au>
This manual page was written by Ron <ron@debian.org>, for the Debian project (but may be used by others).
VPB driver package Jan 4, 2007 MEASERL(1)