12-02-2012
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies
2. UNIX for Dummies Questions & Answers
Hi,
For each row in a file, i would like to identify the maximum value and calculate the percentage/fraction of the max for other values in the row.
Then, I would like to print a copy of the file where values above a threshold are replaced with "1" and other values are left as "0".
In the... (2 Replies)
Discussion started by: auburn
2 Replies
3. UNIX for Dummies Questions & Answers
Hello Everyone,
My issue is that I want to traverse a database table row by row and do some action on the value retrieved in each row.
I have gone through a lot of shell script questions/posts. I could find row by row traversal of a file but not a database table.
Please help.
Thanks &... (5 Replies)
Discussion started by: ahsan.asghar
5 Replies
4. Shell Programming and Scripting
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies
5. Emergency UNIX and Linux Support
Sorry if I repost my question in this section, but I'm really in a hurry since I have to finish my work... :(
Dear community,
I have a table with two rows like:
Row1 Row2
======= =======
7,3 text 1
1,3 text 2
1,2,3 blabla
What i need to do is add/copy... (2 Replies)
Discussion started by: Lord Spectre
2 Replies
6. Shell Programming and Scripting
HI Guys,
I have Below Input :-
RepigA_hteis522 ReptCfiEtrBsCll_aofe
MSL04_MSL2_A25_1A 0 9
MSL04_MSL2_A25_1B 0 9
MSL04_MSL2_A25_1C 0 9
RepigA ReptCfiEtrBsCll
hteis522 aofe
MSL04_MSL2_A25_1A 0 9
MSL04_MSL2_A25_1B 0 9
MSL04_MSL2_A25_1C 0 9
Split Data in two first row... (2 Replies)
Discussion started by: pareshkp
2 Replies
7. UNIX for Beginners Questions & Answers
My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here.
Original File 1:
... (36 Replies)
Discussion started by: aachave1
36 Replies
8. Shell Programming and Scripting
Hi ALL,
We have requirement in a file, i have multiple rows.
Example below:
Input file rows
01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212
01,1,102319,0,1,80,20,U,1,241,00000059420000006021
I need my output file should be as mentioned below. Last field should split for... (4 Replies)
Discussion started by: kotra
4 Replies
9. UNIX for Beginners Questions & Answers
This is a question that is related to one I had last August when I was trying to sort/merge two files by millsecond time column (in this case column 6).
The script (below) that helped me last august by RudiC solved the puzzle of sorting/merging two files by time, except it gets lost when the... (0 Replies)
Discussion started by: aachave1
0 Replies
10. Shell Programming and Scripting
I have the following script that will average the last two fields of each row, but im not sure how to include the 3rd field of the following row.
An example of the analysis that I need to perform from the input - (66.61+58.01+54.16)/3
awk '{sum=cnt=0; for (i=13;i<=NF;i++) { sum+=$i; cnt++... (1 Reply)
Discussion started by: ncwxpanther
1 Replies
LEARN ABOUT DEBIAN
net::sip::dtmf
Net::SIP::DTMF(3pm) User Contributed Perl Documentation Net::SIP::DTMF(3pm)
NAME
Net::SIP::DTMF - DTMF RTP packet generating and extracting
SYNOPSIS
use Net::SIP::DTMF;
my $sub = dtmf_generator(
11, # event '#'
100, # duration 100ms
rfc2833_type => 101, # RTP type 101 for telephone-event/8000
# audio_type => 0, # RTP type 0 for PCMU/8000
);
while (...) {
my @pkt = $sub->($sequence,$timestamp,$srcid);
last if ! @pkt; # dtmf done
next if $buf[0] eq ''; # more coming, but no data this time (pause)
.. send @pkts ...
}
use Net::SIP::DTMF;
my $sub = dtmf_extractor(
rfc2833_type => 101, # RTP type 101 for telephone-event/8000
audio_type => 0, # RTP type 0 for PCMU/8000
);
while (...) {
if ( my ($event,$duration,$type) = $sub->($packet)) {
# event received
...
}
}
DESCRIPTION
This package provides functions for generating RTP packets containing DTMF events or extracting DTMF events from RTP packets.
FUNCTIONS
dtmf_generator ( EVENT, DURATION, %ARGS )
Generates a function which is used to generate packets for the given EVENT.
EVENT is the event numer (0..15) or undef if it should just generate silence or pause. DURATION is the time for the event in ms. ARGS
contain information how the event should be packed: either as RFC2833 RTP event or as RTP audio PCMU/8000. %ARGS can be
rfc2833_type => rtp_type
Gives the RTP payload type number for rfc2833 RTP events (telephone-event/8000). If not given will try audio_type instead.
audio_type => rtp_type
Gives the RTP payload type number for PCMU/8000. If not given and no rfc2833_type given it will croak.
volume => volume
Sets the volume for RTP event according to rfc2833.
The generated function should then be called with SEQUENCE,TIMESTAMP,SRCID to generate the RTP packets and will return @RTP_PACKETS,
with
() - DTMF event is finished
$RTP_PACKETS[0] eq '' - no RTP packet for this call (pause)
@RTP_PACKETS - RTP packets which can be send to the peer
dtmf_extractor ( %ARGS )
Generates a function which is used to extract DTMF events. Keys rfc2833_type and audio_type have the same meaning as in generate_dtmf.
It will only attempt to extract DTMF events from rfc2833 RTP events or audio if the relevant rtp_type is given.
The function will be called with the RTP packet as the only argument and will return () if no new events where found or
(EVENT,DURATION,TYPE) if an event finished, where DURATION is the duration in ms and TYPE is audio|rfc2833.
For performance reasons it is best to use only rfc2833 if the peer supports it.
perl v5.14.2 2012-06-12 Net::SIP::DTMF(3pm)