03-17-2012
Post sample input and desired output.
10 More Discussions You Might Find Interesting
1. Solaris
Can any one give me command How to delete duplicate records with out sort.
Suppose if the records like below:
345,bcd,789
123,abc,456
234,abc,456
712,bcd,789
out tput should be
345,bcd,789
123,abc,456
Key for the records is 2nd and 3rd fields.fields are seperated by colon(,). (2 Replies)
Discussion started by: svenkatareddy
2 Replies
2. Shell Programming and Scripting
Hi
having a file as follows
MediaErr.log
84 Server1 Policy1 Schedule1 master1 05/08/2008 02:12:16
84 Server1 Policy1 Schedule1 master1 05/08/2008 02:22:47
84 Server1 Policy1 Schedule1 master1 05/08/2008 03:41:26
84 Server1 Policy1 ... (1 Reply)
Discussion started by: karthikn7974
1 Replies
3. Shell Programming and Scripting
Can any one give me command How to delete duplicate records with out sort.
Suppose if the records like below:
345,bcd,789
123,abc,456
234,abc,456
712,bcd,789
out tput should be
345,bcd,789
123,abc,456
Key for the records is 2nd and 3rd fields.fields are seperated by colon(,). (19 Replies)
Discussion started by: svenkatareddy
19 Replies
4. Shell Programming and Scripting
Hello to all,
I have this file
2002 1 23 0 0 2435.60 131.70 5.60 20.99 0.89 0.00 285.80 2303.90
2002 1 23 15 0 2436.60 132.90 6.45 21.19 1.03 0.00 285.80 2303.70
2002 1 23 ... (6 Replies)
Discussion started by: joggdial3000
6 Replies
5. Shell Programming and Scripting
How do we sort and remove duplicate on column 1,2 retaining the record with maximum date (in feild 3) for the file with following format.
aaa|1234|2010-12-31
aaa|1234|2010-11-10
bbb|345|2011-01-01
ccc|346|2011-02-01
bbb|345|2011-03-10
aaa|1234|2010-01-01
Required Output
... (5 Replies)
Discussion started by: mabarif16
5 Replies
6. UNIX for Dummies Questions & Answers
hello all,
I have an input file with four columns like this with a lot of lines
and for example, line 1 and line 5 match because the first 4 characters match and the fourth column matches too. I want to keep the line that has the lowest number in the third column. So I discard line 5.... (5 Replies)
Discussion started by: TheTransporter
5 Replies
7. Shell Programming and Scripting
Trying to cut down the size of some log files. Now that I write this out it looks more dificult than i thought it would be.
Need a bash script or command that goes sequentially through all lines of a file, and does this:
if field1 (space separated) is the number 2012 print the entire line. Do... (7 Replies)
Discussion started by: ajp7701
7 Replies
8. Shell Programming and Scripting
Hi All,
i have input file like below...
CA009156;20091003;M;AWBKCA72;123;;CANADIAN WESTERN BANK;EDMONTON;;2300, 10303, JASPER AVENUE;;T5J 3X6;;
CA009156;20091003;M;AWBKCA72;321;;CANADIAN WESTERN BANK;EDMONTON;;2300, 10303, JASPER AVENUE;;T5J 3X6;;
CA009156;20091003;M;AWBKCA72;231;;CANADIAN... (2 Replies)
Discussion started by: mohan sharma
2 Replies
9. Shell Programming and Scripting
Dear community,
I have to remove duplicate lines from a file contains a very big ammount of rows (milions?) based on 1st and 3rd columns
The data are like this:
Region 23/11/2014 09:11:36 41752
Medio 23/11/2014 03:11:38 4132
Info 23/11/2014 05:11:09 4323... (2 Replies)
Discussion started by: Lord Spectre
2 Replies
10. Shell Programming and Scripting
Hi, all
I have a csv file that I would like to remove duplicate lines based on 1st field and sort them by the 1st field. If there are more than 1 line which is same on the 1st field, I want to keep the first line of them and remove the rest. I think I have to use uniq or something, but I still... (8 Replies)
Discussion started by: refrain
8 Replies
LEARN ABOUT DEBIAN
gsm_destroy
GSM(3) Library Functions Manual GSM(3)
NAME
gsm_create, gsm_destroy, gsm_encode, gsm_decode -- GSM 06.10 lossy sound compression
SYNOPSIS
#include "gsm.h"
gsm gsm_create();
void gsm_encode(handle, src, dst)
gsm handle;
gsm_signal src[160];
gsm_frame dst;
int gsm_decode(handle, src, dst)
gsm handle;
gsm_frame src;
gsm_signal dst[160];
void gsm_destroy(handle)
gsm handle;
DESCRIPTION
Gsm is an implementation of the final draft GSM 06.10 standard for full-rate speech transcoding.
gsm_create() initializes a gsm pass and returns a 'gsm' object which can be used as a handle in subsequent calls to gsm_decode(),
gsm_encode() or gsm_destroy().
gsm_encode() encodes an array of 160 13-bit samples (given as gsm_signal's, signed integral values of at least 16 bits) into a gsm_frame of
33 bytes. (gsm_frame is a type defined as an array of 33 gsm_bytes in gsm.h.)
gsm_decode() decodes a gsm_frame into an array of 160 13-bit samples (given as gsm_signals), which sound rather like what you handed to
gsm_encode() on the other side of the wire.
gsm_destroy() finishes a gsm pass and frees all storage associated with it.
Sample format
The following scaling is assumed for input to the algorithm:
0 1 11 12
S..v..v..v..v..v..v..v..v..v..v..v..v..*..*..*
Only the top 13 bits are used as a signed input value.
The output of gsm_decode() has the three lower bits set to zero.
RETURN VALUE
gsm_create() returns an opaque handle object of type gsm, or 0 on error. gsm_decode() returns -1 if the passed frame is invalid, else 0.
EXAMPLE
#include "gsm.h"
gsm handle;
gsm_frame buf;
gsm_signal sample[160];
int cc, soundfd;
play() { /* read compressed data from standard input, write to soundfd */
if (!(handle = gsm_create())) error...
while (cc = read(0, (char *)buf, sizeof buf)) {
if (cc != sizeof buf) error...
if (gsm_decode(handle, buf, sample) < 0) error...
if (write(soundfd, sample, sizeof sample) != sizeof sample)
error...
}
gsm_destroy(handle);
}
record() { /* read from soundfd, write compressed to standard output */
if (!(handle = gsm_create())) error...
while (cc = read(soundfd, sample, sizeof sample)) {
if (cc != sizeof sample) error...
gsm_encode(handle, sample, buf);
if (write(1, (char *)buf, sizeof buf) != sizeof sample)
error...
}
gsm_destroy(handle);
}
BUGS
Please direct bug reports to jutta@cs.tu-berlin.de and cabo@cs.tu-berlin.de.
SEE ALSO
toast(1), gsm_print(3), gsm_explode(3), gsm_option(3)
GSM(3)